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 token aliases and upgrade Prism #33

Merged
merged 5 commits into from
Apr 26, 2019
Merged

Conversation

kitten
Copy link
Contributor

@kitten kitten commented Apr 23, 2019

Fix #29
Fix #14

This adds support for token aliases, which was unfortunately missing before. It also upgrades prismjs and ensures that js-extras is included.

@karlhorky Sorry, this might be as good as we can get it for now without some tremendous extra-effort. Testing these changes would be appreciated, if you have the time 🙌

@kitten kitten changed the title Feat/improve tokenisation Fix token aliases and upgrade Prism Apr 23, 2019
@kitten kitten force-pushed the feat/improve-tokenisation branch from 465bd3a to 01fb022 Compare April 23, 2019 22:46
@karlhorky
Copy link
Contributor

Approach sounds pretty good to me! What does the support for token aliases enable?

@kitten
Copy link
Contributor Author

kitten commented Apr 26, 2019

@karlhorky it's basically sth that is already present in Prism themes but that I forgot to add support for. In certain cases themes can specify "aliases" which are more specific types of tokens that should take precedence over the other types. One example afaik are keywords being marked as "important" in JS

@karlhorky
Copy link
Contributor

Ah cool, yeah then I suppose that may enable things like what I was trying to accomplish with styling the = and ", cool!

#29 (comment)

@karlhorky
Copy link
Contributor

Oh I've guess it won't for this exact case (see my request to improve the Prism.js tokenization: PrismJS/prism#1871) but it will maybe improve other cases.

@kitten
Copy link
Contributor Author

kitten commented Apr 26, 2019

Yeah, I don't see any regressions from this PR, so I'll ship it, and if Prism improves some syntaxes we'll definitely profit from it 😅

@kitten kitten merged commit 64f879a into master Apr 26, 2019
@kitten kitten deleted the feat/improve-tokenisation branch April 26, 2019 14:31
@karlhorky
Copy link
Contributor

Awesome, thanks! Is there going to be a new version published too?

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.

Improve tokenization Aliases representing classes is not applied.
2 participants