Skip to content

Syntax highlighting for Svelte #208

@damascene

Description

@damascene

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    htmlCaused by the hypertext lexer

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions