Skip to content

Fix wrong escapes. #2493

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

Merged
merged 1 commit into from
Sep 7, 2019
Merged

Fix wrong escapes. #2493

merged 1 commit into from
Sep 7, 2019

Conversation

XhmikosR
Copy link
Contributor

@XhmikosR XhmikosR commented Sep 4, 2019

When we use a code block, we don't need to escape underscores or other special characters.

/CC @nschonni

@XhmikosR
Copy link
Contributor Author

XhmikosR commented Sep 4, 2019

BTW my regex is probably not perfect, so I might have missed some cases. Any suggestions welcome.

`(.*)?\\(.*)?`

@XhmikosR
Copy link
Contributor Author

XhmikosR commented Sep 4, 2019

Alright, this is ready. It includes #2492 so it might need a rebase after that is merged.

I'm not sure how to check for this automatically. Would make total sense to have an automated check for extraneous escapes.

@nschonni
Copy link
Member

nschonni commented Sep 5, 2019

Looks like it didn't cause a conflict with the other one landing

When we use a code block, we don't need to escape underscores or other special characters.
@XhmikosR
Copy link
Contributor Author

XhmikosR commented Sep 5, 2019

Rebased and fixed 12.10.0 too.

We need an automated check for this, otherwise it'll keep happening. Maybe after switching to remark-lint we could do something about it.

@BridgeAR
Copy link
Member

BridgeAR commented Sep 5, 2019

@XhmikosR I see that they are not necessary but I am not sure if they might break anything. AFAIK they are just not needed? If that's the case, I would not really bother.
If they indeed break something, I would include a check in our commit message linter in the core repository. That would prevent most of these ending up in the changelog.

@XhmikosR
Copy link
Contributor Author

XhmikosR commented Sep 5, 2019

@BridgeAR: it changes rendering completely, so they are not just redundant, they are wrong.

I don't have any solution for the linter, at least not in this repo. But we definitely need something to check for this.

@BridgeAR
Copy link
Member

BridgeAR commented Sep 5, 2019

@XhmikosR linting for the commit message in core would prevent the issue in this repository in the future. Currently it seems to only apply to the release posts and those include the changelog. The changelog is build by our tooling and includes all individual commit messages. The commit messages some times include obsolete underscores and that could be checked for.

Besides that: this repository uses pre-commit hooks to verify a couple of things. It should be relatively straight forward to include a check for such cases in the hook as well.

@XhmikosR
Copy link
Contributor Author

XhmikosR commented Sep 5, 2019

I'm just not sure if it can be automated. I mean, how can we distinguish between a wrong escape and an escape on purpose? We can't just disallow \.

Anyway, that's something that should be discussed in #2501, I'm not sure I can work on this too myself :)

@SEWeiTung SEWeiTung merged commit 1b3062c into nodejs:master Sep 7, 2019
@XhmikosR XhmikosR deleted the master-xmr-fix-escapes branch September 7, 2019 05:29
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.

5 participants