Skip to content

Commit

Permalink
Simplify markdown punctuation scope
Browse files Browse the repository at this point in the history
  • Loading branch information
deathaxe committed Mar 10, 2024
1 parent f89aac2 commit 24a2ea1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Syntaxes/HTML (Astro).sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
10 changes: 5 additions & 5 deletions tests/syntax_test_astro.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
<ul>
{posts.map(post => <li>{post.frontmatter.title}</li>)}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ markup.raw.code-fence.markdown-gfm text.html.astro meta.interpolation.astro
| ^ punctuation.section.interpolation.begin.astro
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.tsx.embedded.astro meta.function-call.method.js
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.tsx.embedded.astro
| ^ punctuation.section.interpolation.end.astro
</ul>
```
Expand Down

0 comments on commit 24a2ea1

Please sign in to comment.