From 8ef7a72c55e66c097c0130ab17e2062ef75e4723 Mon Sep 17 00:00:00 2001 From: pommicket Date: Wed, 28 Dec 2022 17:53:22 -0500 Subject: syntax highlighting for JSON, and XML as a separate language --- syntax.c | 63 ++++++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 36 insertions(+), 27 deletions(-) (limited to 'syntax.c') diff --git a/syntax.c b/syntax.c index a8ce4d4..f21999b 100644 --- a/syntax.c +++ b/syntax.c @@ -30,6 +30,7 @@ char const *language_comment_start(Language l) { case LANG_CPP: case LANG_JAVASCRIPT: case LANG_TYPESCRIPT: + case LANG_JSON: // JSON technically doesn't have comments but apparently some parsers support this so might as well have this here case LANG_JAVA: case LANG_GO: return "// "; @@ -40,6 +41,7 @@ char const *language_comment_start(Language l) { case LANG_TEX: return "% "; case LANG_HTML: + case LANG_XML: return "