Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Jira comments to not automatically strikethrough when typing a hyphen?

Mike Ely December 17, 2018

Incredibly frustrating this: in a comment, I'll type a range say, or something else where a hyphen is normally expected, and Jira then deletes the hyphen and strikes through the entire line.

Expected: We ran the simulation for 20-30 minutes with no result.

Actual:  ̶W̶e̶ ̶r̶a̶n̶ ̶t̶h̶e̶ ̶s̶i̶m̶u̶l̶a̶t̶i̶o̶n̶ ̶f̶o̶r̶ ̶2̶0̶3̶0̶ ̶m̶i̶n̶w̶h̶a̶t̶ ̶t̶h̶e̶ ̶a̶c̶t̶u̶a̶l̶ ̶h̶e̶c̶k̶ ̶i̶s̶ ̶a̶r̶g̶h̶!̶

3 answers

2 votes
Payne
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 18, 2018

Kind of a pain to have to remember to do it, but a backslash prior to the hyphen will escape it and prevent it from being interpreted.

e.g. \-don't strike through this text\-

0 votes
Jason Trautschold
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 17, 2018

I think you can get around the automatic text markup by using a noformat macro. You can open and close a section with {noformat} and any block of text inside will not have any other wiki formatting applied, assuming your Jira instance has the appropriate Renderers enabled. Example would be:

{noformat}

A->B simulation takes 20-30 minutes

{noformat}

Mike Ely December 17, 2018

Thanks for your reply. It seems like this would kill all formatting. Is there instead a way to specifically target this hyphenation-to-strikethrough unwanted feature? We do a lot of things like method->execute(a-z) which leads to expected angst, and even if it's per-user this seems like something that should be a toggle to get rid of (or better yet wrap in barbed wire and fire into the sun).

Jason Trautschold
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 17, 2018

Hmm, sorry that that solution won't work. It sounds like you are using Wiki style markup, you may want to try changing to the Default Text Renderer for the Comment field. The setting can be found by going to the project settings, then> Fields > Actions > Click to edit fields. Then, find the field you would like to edit (in this case Comment) and click on Renderers, changing it to Default Text Renderer. Hope that works.

0 votes
Mike Ely December 17, 2018

Ah, I see what's happening:

A->B simulation takes 20-30 minutes

For some reason Jira is treating those two hyphens as opening and closing "strikethrough this text" tags even though nobody ever asked it to do that. Or at least I didn't ask it to do that. It needs to not do that. So how do we stop this runaway monster?

Suggest an answer

Log in or Sign up to answer