• 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.

  • Well, I won't be doing that, but thank you for the detailed explanation of the obstacles involved. Hope you have a good evening.

  • No worries.

    And yeah, that's why I haven't fixed it either.

    Similar to a few other small quirks I know about which 6 years ago made sense and were the right amount of effort. But now the browsers are doing things better and there are better Go libraries for me to do things.

    In time I'll get around to these... but I'm not really putting in the evening and weekend work I should to make that soon.

About