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

Escape all punctuation chars in markdown output #94

Closed
wants to merge 1 commit into from

Conversation

aduh95
Copy link
Contributor

@aduh95 aduh95 commented May 3, 2021

Refs: nodejs/node#38522 (comment)

Ideally we would support backtick strings in commit message (as GitHub web UI now does), but a quicker fix is to escape them for now.

@rvagg
Copy link
Member

rvagg commented May 4, 2021

Pretty big change, see the failed tests, 1\.2\.3 version numbers, \-\-blah flags, \#foo, etc.
Do a diff on the nodejs/node changelog with what this makes, it's going to make it much harder to human-read the raw markdown. I don't know if I'm +1 on this, escaping things like . and - are a bit much. Just because the markdown spec suggests that these can be escaped doesn't mean they should be. I'd recommend just escaping what's problematic. If you're suggesting escaping backticks, then escape backticks. But also be aware that these have been intentionally unescaped because it looks much nicer to have <code> blocks within the rendered commit messages and commit authors have been using it as such.
IMO the solution you're looking for is to find a regex that skips escaping inside each set of backticks.

@aduh95 aduh95 closed this May 5, 2021
@aduh95 aduh95 deleted the cleaner-markdown branch May 5, 2021 09:35
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.

None yet

2 participants