Skip to content
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

Fix underscores within bold text getting emphasized (#589) #590

Merged
merged 3 commits into from
Jul 24, 2024

Conversation

Crozzers
Copy link
Contributor

This PR fixes #589, which saw a regression for the following snippet:

**bold_but_not_emphasized**

This regression was introduced in fcaadfe when the code-friendly extra was converted to the new Extra format.

Prior to this change we had two different versions of the strong/em regexes and we'd run one or the other. That's not possible in the new format so the CodeFriendly extra runs before italics and bold and hashes text to protect it from the regex.

Currently it only hashes text if it's using the _underscore bold syntax_, but for *star syntax* it doesn't check if the text contains any underscores, which is how this can slip through.

I've modified the extra to check for underscores within the bold text. It will now hash that text, protecting it from the strong/em regex, and it will be unhashed afterwards.

@nicholasserra
Copy link
Collaborator

Thank you!

@nicholasserra nicholasserra merged commit c35e704 into trentm:master Jul 24, 2024
15 checks passed
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.

Regression for **bolded_code_friendly** text
3 participants