Home/Jira formatting reference
Jira text formatting
En dash and em dash in Jira wiki markup: -- and ---
Two hyphens between words become an en dash and three become an em dash when Jira renders wiki markup. The characters are converted at save time, so ADF stores the real Unicode characters and the API no longer returns the hyphens. A single hyphen between two words is left alone.
Wiki markup
--
---
Stored as ADF (REST API v3)
The ADF document Jira Cloud stores for a -- b:
{
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "a \u2013 b"
}
]
}
]
}
Examples
Wiki markup (API v2)
a -- bTwo hyphens with spaces on both sides give an en dash.
Rendered by Jira (HTML)
<p>a – b</p>Back to wiki after the round trip
a – bSent to Jira Cloud on .
Wiki markup (API v2)
a --- bThree hyphens with spaces on both sides give an em dash.
Rendered by Jira (HTML)
<p>a — b</p>Back to wiki after the round trip
a — bSent to Jira Cloud on .
Wiki markup (API v2)
---Three hyphens alone in a paragraph also become an em dash, not a rule.
Rendered by Jira (HTML)
<p>—</p>Back to wiki after the round trip
—Sent to Jira Cloud on .
Wiki markup (API v2)
2-3-4 and a-b-cSingle hyphens inside words and numbers are never touched.
Rendered by Jira (HTML)
<p>2-3-4 and a-b-c</p>Back to wiki after the round trip
2-3-4 and a-b-cSent to Jira Cloud on .
Wiki markup (API v2)
price -10- 8 euroA hyphen pair around a word is strikethrough, not a dash.
Rendered by Jira (HTML)
<p>price <del>10</del> 8 euro</p>Back to wiki after the round trip
price -10- 8 euroSent to Jira Cloud on .
What changes in conversion
- -- and --- are replaced by the characters U+2013 and U+2014 in the stored ADF text node.
- v2 returns the typed hyphens for a comment sent as wiki, but after a save through ADF the wiki read-back contains the real dash characters.
- There is no way to get the hyphens back from the stored ADF. To keep two literal hyphens, see escaping.
- Single hyphens are plain text and need no conversion in either format.
Pitfalls
-10-style text (hyphen, word, hyphen) is a strikethrough, even in the middle of a sentence.- After a save through ADF the text holds the dash characters, so a search for the typed hyphens does not match the stored text.