jira2markdown icon indicating copy to clipboard operation
jira2markdown copied to clipboard

Enhancement: Add logic for when Jira Editor wraps text effects (`~`, `_`, `+`, etc) in curly braces `{ }`

Open arctus-io opened this issue 5 months ago • 0 comments

I haven't been able to find the Atlassian documentation behind why this happens but in real world usage the Jira Editor sometimes wraps text effects (~, _, +, etc) in curly braces { }.

For instance instead of having this:

This is *strong*

This is +inserted+

This is _emphasis_

is will sometimes have this:

This is {*}strong{*}

This is {+}inserted{+}

This is {_}emphasis{_}

which renders in Jira exactly the same as the first.

jira2markdown isn't aware causing erroneous markdown output.

I can provide additional info and/or submit a PR later on. I feel like following something similar to the implementation of the color conversion in text_effects.Color() would be a good way forward.


Related but possibly out of scope for this issue, Jira Editor allows text effects to inline code (monospaced, {{ }}) using curly braces and sometimes adds empty curly braces to in-line code that don't change the rendering.

I am {{{}code{}}}

In Jira this would visually render as:

I am code

I am {{*bold code*}}

I am also {{{*}bold code{*}}}

In Jira this would visually render as:

I am bold code I am also bold code

arctus-io avatar Sep 23 '24 19:09 arctus-io