Jira API Issue: Numbered Lists Display as Hashtags

When retrieving ticket descriptions via the Jira API, numbered lists appear as hashtags, triggering markdown header formatting. Why does this happen and how can it be adjusted?

I encountered a similar issue when retrieving descriptions via the Jira API. The problem arises because the API output interprets the initial combinations of numbers and periods as markdown header syntax. In my case, I resolved this by processing the text before final display. I implemented a simple routine to check for patterns that trigger formatting errors and replaced or escaped them accordingly. Although this workaround isn’t perfect, it ensures that numbered lists display as intended rather than as misinterpreted headers.

In my experience, this issue is largely due to how flexible markdown parsers handle number sequences. The API output treats any numeral followed by a period at the start of a line as a header rather than a list. To circumvent this, I modified the parser in the web interface rather than the API itself. I altered the display layer to look for these patterns and either insert a space or an alternative escape character so that markdown won’t misinterpret them. This method keeps the raw API data intact while ensuring the end result displays properly.

hey i fixed it by inserting a pre-parser that escapes the start of numbered list lines. pretty basic hack but it worked fine in my case

Based on my experience, this behavior typically stems from the markdown parser interpreting the sequence of a number and a period at the beginning of a line as a header indicator. What I ended up doing was modifying my API retrieval layer so that it escapes the first few characters of any line that appears to start with a numbered list pattern. I implemented a simple regular expression that detects this pattern and inserts an escape character, thus stopping markdown from converting it into a header. This method isn’t overly complex and works reliably across different markdown configurations.