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 #208

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

Syntax highlighting for Svelte #208

damascene opened this issue Sep 26, 2023 · 1 comment
Labels
html Caused by the hypertext lexer

Comments

@damascene
Copy link

Could you please add support for Svelte syntax highlighting. I tried to use HTML markup syntax with Geany that depends on your library 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}

Originally reported in geany/geany#3562

@nyamatongwe nyamatongwe added the html Caused by the hypertext lexer label Sep 26, 2023
@nyamatongwe
Copy link
Member

Could you please add support for Svelte syntax highlighting.

Commonly, new features arrive from people interested in that feature. Current contributors are unlikely to take on new features that they won't use themselves.

Since this would be an extension to HTML, like the current support for Mako and Django, it would be a change to lexilla/lexers/LexHTML.cxx. Understanding code that mentions 'mako' and 'django' would be a starting point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
html Caused by the hypertext lexer
Projects
None yet
Development

No branches or pull requests

2 participants