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

GFM Alerts should be case insensitive to match GitHub #1390

Closed
Unfocused opened this issue Jan 25, 2024 · 2 comments
Closed

GFM Alerts should be case insensitive to match GitHub #1390

Unfocused opened this issue Jan 25, 2024 · 2 comments
Labels
Help wanted Looking for help. Issue: Bug Res: Duplicate This issue or pull request already exists.

Comments

@Unfocused
Copy link

What's the problem

The matching of GFM Alerts is currently case-sensitive, only allowing uppercase:

> [!WARNING]
> Oh noes

Warning

Oh noes

But GitHub doesn't care about the case the alert type (the word in the square brackets) - the matching is case insensitive.

What's the expected result

The following should also work:

> [!warning]
> Oh noes

Warning

Oh noes

> [!WaRnInG]
> Oh noes

Warning

Oh noes

Other information

markdown-it-github-alerts changed the default of case sensitivity to match GitHub in v0.3.0.

However, v0.2.0 added support for markdown-it v14, whereas it seems Markdown All in One currently uses v13 - I don't know if that's a problem or not.

An alternative is to keep using the current version of markdown-it-github-alerts (v0.1.2) and pass in a config object to explicitly set matchCaseSensitive to false. That'll be future-proof for whenever a newer version of the package is eventually used.

@yzhang-gh
Copy link
Owner

Thanks for the detailed information. We have already known this in #1389. However, there is a stange behavior in CI (which is about the version of markdown-it) so I didn't merge it in. I may be slow to respond as it is close to the Chinese new year. It would be great if someone could help.

@Unfocused
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help wanted Looking for help. Issue: Bug Res: Duplicate This issue or pull request already exists.
Projects
None yet
Development

No branches or pull requests

2 participants