Skip to content

Better emphasis #77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

luciansmith
Copy link
Contributor

@luciansmith luciansmith commented Apr 30, 2025

Description of the change

Don't replace internal underscores with emphasis tags. This was particularly important for URLs, which are often littered with them, and none of them should instead have <em> in them; that's invalid HTML.

The same change should be made for strong tags (like this) but the same fix there broke overall parsing. Stubs provided; maybe someone can figure out what went wrong.

Checklist for contributor

  • if you want to be mentioned in the AUTHORS file, you added yourself
  • added an entry to CHANGELOG.md at "Upcoming"
  • if any Markdown definition changed, you updated the definition docs
  • your C++ code change is accommodated with a unit/integration test where it makes sense
  • your code meets the code format style (clang-format) of the project (tools/format.py)

I was getting failures where URLs with underscores were getting <em> blocks thrown in them, creating invalid HTML.
Most don't pass (and are disabled), but should.  Unfortunately, adding a word boundary (\b) to the strong regex works for these tests, but somehow the full parser then breaks.  The regex that I believed should work is added as a comment, for anyone wishing to make things work going forward.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant