mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-11-23 20:56:42 +00:00
fix: better grammar on incomplete heading (#187)
This commit is contained in:
parent
6e3af65749
commit
4b1057efaf
4 changed files with 28 additions and 12 deletions
|
|
@ -170,10 +170,10 @@ const markupMath: textmate.Pattern = {
|
|||
|
||||
const markupHeading: textmate.Pattern = {
|
||||
name: "markup.heading.typst",
|
||||
begin: /^\s*=+\s+/,
|
||||
begin: /^\s*(=+)(?:(?=[\r\n]|$)|\s+)/,
|
||||
end: /\n|(?=<)/,
|
||||
beginCaptures: {
|
||||
"0": {
|
||||
"1": {
|
||||
name: "punctuation.definition.heading.typst",
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -12,63 +12,73 @@
|
|||
# ^ source.typst meta.expr.set.typst meta.expr.call.typst string.quoted.double.typst punctuation.definition.string.typst
|
||||
# ^ source.typst meta.expr.set.typst meta.expr.call.typst meta.brace.round.typst
|
||||
>= <test>
|
||||
#^^ source.typst markup.heading.typst punctuation.definition.heading.typst
|
||||
#^ source.typst markup.heading.typst punctuation.definition.heading.typst
|
||||
# ^ source.typst markup.heading.typst
|
||||
# ^^^^^^ source.typst entity.other.label.typst
|
||||
>@test
|
||||
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
||||
# ^^^^ source.typst entity.other.reference.typst
|
||||
>= <test->
|
||||
#^^ source.typst markup.heading.typst punctuation.definition.heading.typst
|
||||
#^ source.typst markup.heading.typst punctuation.definition.heading.typst
|
||||
# ^ source.typst markup.heading.typst
|
||||
# ^^^^^^^ source.typst entity.other.label.typst
|
||||
>@test-
|
||||
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
||||
# ^^^^^ source.typst entity.other.reference.typst
|
||||
>= <test:>
|
||||
#^^ source.typst markup.heading.typst punctuation.definition.heading.typst
|
||||
#^ source.typst markup.heading.typst punctuation.definition.heading.typst
|
||||
# ^ source.typst markup.heading.typst
|
||||
# ^^^^^^^ source.typst entity.other.label.typst
|
||||
>@test:
|
||||
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
||||
# ^^^^^ source.typst entity.other.reference.typst
|
||||
>= <test.>
|
||||
#^^ source.typst markup.heading.typst punctuation.definition.heading.typst
|
||||
#^ source.typst markup.heading.typst punctuation.definition.heading.typst
|
||||
# ^ source.typst markup.heading.typst
|
||||
# ^^^^^^^ source.typst entity.other.label.typst
|
||||
>@test.
|
||||
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
||||
# ^^^^^ source.typst entity.other.reference.typst
|
||||
>= <test.1>
|
||||
#^^ source.typst markup.heading.typst punctuation.definition.heading.typst
|
||||
#^ source.typst markup.heading.typst punctuation.definition.heading.typst
|
||||
# ^ source.typst markup.heading.typst
|
||||
# ^^^^^^^^ source.typst entity.other.label.typst
|
||||
>@test.1
|
||||
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
||||
# ^^^^^^ source.typst entity.other.reference.typst
|
||||
>= <test:1>
|
||||
#^^ source.typst markup.heading.typst punctuation.definition.heading.typst
|
||||
#^ source.typst markup.heading.typst punctuation.definition.heading.typst
|
||||
# ^ source.typst markup.heading.typst
|
||||
# ^^^^^^^^ source.typst entity.other.label.typst
|
||||
>@test:1
|
||||
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
||||
# ^^^^^^ source.typst entity.other.reference.typst
|
||||
>= <test::>
|
||||
#^^ source.typst markup.heading.typst punctuation.definition.heading.typst
|
||||
#^ source.typst markup.heading.typst punctuation.definition.heading.typst
|
||||
# ^ source.typst markup.heading.typst
|
||||
# ^^^^^^^^ source.typst entity.other.label.typst
|
||||
>@test::
|
||||
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
||||
# ^^^^ source.typst entity.other.reference.typst
|
||||
# ^^^ source.typst
|
||||
>= <typst::World>
|
||||
#^^ source.typst markup.heading.typst punctuation.definition.heading.typst
|
||||
#^ source.typst markup.heading.typst punctuation.definition.heading.typst
|
||||
# ^ source.typst markup.heading.typst
|
||||
# ^^^^^^^^^^^^^^ source.typst entity.other.label.typst
|
||||
>@typst::World
|
||||
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
||||
# ^^^^^^^^^^^^ source.typst entity.other.reference.typst
|
||||
>= <test::.>
|
||||
#^^ source.typst markup.heading.typst punctuation.definition.heading.typst
|
||||
#^ source.typst markup.heading.typst punctuation.definition.heading.typst
|
||||
# ^ source.typst markup.heading.typst
|
||||
# ^^^^^^^^^ source.typst entity.other.label.typst
|
||||
>@test::. e
|
||||
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
||||
# ^^^^ source.typst entity.other.reference.typst
|
||||
# ^^^^^^ source.typst
|
||||
>= <test: :.>
|
||||
#^^ source.typst markup.heading.typst punctuation.definition.heading.typst
|
||||
#^ source.typst markup.heading.typst punctuation.definition.heading.typst
|
||||
# ^ source.typst markup.heading.typst
|
||||
# ^^^^^^^^^^^ source.typst
|
||||
>@test: :. e
|
||||
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
===
|
||||
test
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
>===
|
||||
#^^^ source.typst markup.heading.typst punctuation.definition.heading.typst
|
||||
>test
|
||||
#^^^^^ source.typst
|
||||
Loading…
Add table
Add a link
Reference in a new issue