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

Improve tokenization #29

Closed
karlhorky opened this issue Mar 4, 2019 · 1 comment · Fixed by #33
Closed

Improve tokenization #29

karlhorky opened this issue Mar 4, 2019 · 1 comment · Fixed by #33

Comments

@karlhorky
Copy link
Contributor

karlhorky commented Mar 4, 2019

As mentioned in #28 (comment), the tokenization and classes leave some things to be desired.

Would it fit the goals of this project to improve the support of the tokenization? I'm looking at this in terms of implementing more fully-featured themes, such as what I started in #28.

An example is this:

prism-react-renderer with Improved VS Code theme (#28)

screen shot 2019-03-04 at 17 58 24

screen shot 2019-03-04 at 17 58 36

VS Code
screen shot 2019-03-04 at 18 14 10

Would be nice to get a bit closer to VS Code's version (<, = and " punctuation highlighted differently).


Looking more in detail, I see that there are some limitations inherent in Prism, but maybe there could still be some improvements somehow, such as integration of Prism JS Extras: PrismJS/prism#1743


If improving tokenization is not easy or possible without changing Prism, one thing that could be easier to do would be to allow for changing the plain colors by language, so that the CSS plain could be the orange color instead of the light blue (which is more common throughout, which is why I opted to use it).

prism-react-renderer with Improved VS Code theme (#28)

css-after

VS Code

css-real-vs-code

@karlhorky
Copy link
Contributor Author

Also opened a request to improve the tokenization of Prism.js: PrismJS/prism#1871

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 a pull request may close this issue.

1 participant