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 registered language name for grammar names with dash, fixes #3263. #3264

Merged
merged 3 commits into from Jul 5, 2021

Conversation

fredrikekre
Copy link
Contributor

Grammars with - in the name (julia-repl) now correctly register as that instead of julia_repl. The replacement here should reverse the modification in

const escape = (s) => "grmr_" + s.replace("-", "_");

fixes #3263

@joshgoebel
Copy link
Member

joshgoebel commented Jul 5, 2021

The replacement here should reverse the modification in

Do you know of any way to just quote the export names so we could avoid this encode/decode dance? I couldn't find anything looking at the export documentation. Obviously once imported from the stub JS keys are more than capable of being strings with - inside them, I just don't know if it's possible to do this with the export itself.

@fredrikekre
Copy link
Contributor Author

I have no idea, sorry.

src/stub.js Show resolved Hide resolved
@joshgoebel
Copy link
Member

@fredrikekre Thanks for much for spotting this and the PR so now 11.1 won't be broken!!!

@joshgoebel joshgoebel merged commit 1cb086b into highlightjs:main Jul 5, 2021
@fredrikekre fredrikekre deleted the fe/replace-dash branch July 5, 2021 20:32
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.

Breaking language name change for languages with dash (python-repl is now python_repl)
2 participants