-
Fair enough, and I accept PRs.
The code in question is here: https://github.com/microcosm-cc/microcosm/blob/master/models/markdown.go#L193
It's a simple regex text replace on textual data within HTML. It is a fast, forward-only parser that is provided by the core Go team and this does not have context of the parent node merely the current node and type.
To fully achieve what you need we'd probably need a full DOM tree here to ensure we don't perform the replace text where an ancestor is a code or preformatted element.
Once done, you'd need to also ensure the CSS works cross-browser to ensure that the layout isn't broken for all comments... only for the comment that exceeds the standard width (as it won't now wrap). This is harder, as the version of Bootstrap is 6 years old, and the version of Django is 6 years old, and neither build any more. So you'd need to start by resolving all dependencies needed by Django and node so that you could build both again... then you could make the adjustments to Bootstrap and push them into the Django build which I could merge, build and then ship.
PRs happily accepted.
Or it's good enough as what you describe is an edge-case we can live with.
I understand your point, but given that code blocks are specifically used for situations where every character matters, introducing new ones seems like a bad behaviour.
Context: https://www.lfgss.com/comments/16327731/
Fwiw the code block text reflows fine on my phone at a different point in the string. Your example string of numbers weirdly doesn't, it's one character too wide for the screen.