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

svelte syntax highlighting via prism #4851

Merged
merged 1 commit into from
May 17, 2020
Merged

Conversation

pngwn
Copy link
Member

@pngwn pngwn commented May 17, 2020

This PR adds proper syntax highlighting to svelte code blocks via prism-svelte.

It works for big old code blocks like this:
Screenshot 2020-05-17 at 16 13 42

And also for those signatures we have like this:
Screenshot 2020-05-17 at 16 14 38

If some helpful folk could take a look over the svelte blocks to make sure nothing is amiss, that would be great.

The svelte grammar extends the markup grammar so the addition of a new sv tag wasn't strictly necessary (all valid HTML should be highlighted correctly too) but I felt it was better to be explicit.

@pngwn pngwn changed the title Prism svelte syntax highlighting via prism May 17, 2020
@Rich-Harris Rich-Harris merged commit d5e9559 into sveltejs:master May 17, 2020
@Rich-Harris
Copy link
Member

oh man so much nicer

taylorzane pushed a commit to taylorzane/svelte that referenced this pull request Dec 17, 2020
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.

2 participants