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

Syntax highlighting for Svelte #3562

Open
damascene opened this issue Sep 25, 2023 · 1 comment
Open

Syntax highlighting for Svelte #3562

damascene opened this issue Sep 25, 2023 · 1 comment
Labels

Comments

@damascene
Copy link

Could you please add support for Svelte syntax highlighting. I tried to use HTML markup syntax but it seems to break on some tags like {# each} and {#if}. Probably because of {#.

I've included screenshot and code snippet that may help represent the current situation.

Docs: https://svelte.dev/docs/introduction

image

<script>
	let count = 0;

	function increment() {
		count += 1;
	}
</script>

<button on:click={increment}>
	Clicked {count}
	{count === 1 ? 'time' : 'times'}
</button>

{#if count > 10}
	<p>{count} is greater than 10</p>
{:else if count < 5}
	<p>{count} is less than 5</p>
{:else}
	<p>{count} is between 5 and 10</p>
{/if}
@elextr
Copy link
Member

elextr commented Sep 25, 2023

Syntax highlighting lexers come from the Lexilla project. The lexer would need to be added there first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants