From 24a2ea16f1ef7189a7fbe54bc03f9087669c537c Mon Sep 17 00:00:00 2001 From: deathaxe Date: Sun, 10 Mar 2024 14:32:57 +0100 Subject: [PATCH] Simplify markdown punctuation scope caused by: https://github.com/sublimehq/Packages/pull/3941 --- Syntaxes/HTML (Astro).sublime-syntax | 4 ++-- tests/syntax_test_astro.md | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Syntaxes/HTML (Astro).sublime-syntax b/Syntaxes/HTML (Astro).sublime-syntax index e0629dd..93b4661 100644 --- a/Syntaxes/HTML (Astro).sublime-syntax +++ b/Syntaxes/HTML (Astro).sublime-syntax @@ -37,14 +37,14 @@ contexts: - match: \s*(---)\s*\n captures: 0: meta.frontmatter.astro - 1: punctuation.section.block.begin.frontmatter.astro + 1: punctuation.section.frontmatter.begin.astro 2: constant.other.language-name.astro embed: scope:source.ts#script embed_scope: meta.frontmatter.astro source.ts.embedded.astro escape: ^\s*(---|\.{3})\s*\n # pandoc requires the remainder of the line to be blank escape_captures: 0: meta.frontmatter.astro - 1: punctuation.section.block.end.frontmatter.astro + 1: punctuation.section.frontmatter.end.astro pop: 1 # Ensure to highlight frontmatter if the syntax is embedded, but pop as early as possible - match: ^|(?=\S) diff --git a/tests/syntax_test_astro.md b/tests/syntax_test_astro.md index 47e449a..cb5ab48 100644 --- a/tests/syntax_test_astro.md +++ b/tests/syntax_test_astro.md @@ -86,21 +86,21 @@ The {frontmatter.author} is {frontmatter.age} and lives in Toronto, Canada. ```astro --- -| <- markup.raw.code-fence.markdown-gfm text.html.astro meta.frontmatter.astro punctuation.section.block.begin.frontmatter.astro +| <- markup.raw.code-fence.markdown-gfm text.html.astro meta.frontmatter.astro punctuation.section.frontmatter.begin.astro |^^^ markup.raw.code-fence.markdown-gfm text.html.astro meta.frontmatter.astro -|^^ punctuation.section.block.begin.frontmatter.astro +|^^ punctuation.section.frontmatter.begin.astro | <- markup.raw.code-fence.markdown-gfm text.html.astro meta.frontmatter.astro source.ts.embedded.astro --- -| <- markup.raw.code-fence.markdown-gfm text.html.astro meta.frontmatter.astro punctuation.section.block.end.frontmatter.astro +| <- markup.raw.code-fence.markdown-gfm text.html.astro meta.frontmatter.astro punctuation.section.frontmatter.end.astro |^^^ markup.raw.code-fence.markdown-gfm text.html.astro meta.frontmatter.astro -|^^ punctuation.section.block.end.frontmatter.astro +|^^ punctuation.section.frontmatter.end.astro ```