mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-11-24 13:10:07 +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 = {
|
const markupHeading: textmate.Pattern = {
|
||||||
name: "markup.heading.typst",
|
name: "markup.heading.typst",
|
||||||
begin: /^\s*=+\s+/,
|
begin: /^\s*(=+)(?:(?=[\r\n]|$)|\s+)/,
|
||||||
end: /\n|(?=<)/,
|
end: /\n|(?=<)/,
|
||||||
beginCaptures: {
|
beginCaptures: {
|
||||||
"0": {
|
"1": {
|
||||||
name: "punctuation.definition.heading.typst",
|
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 string.quoted.double.typst punctuation.definition.string.typst
|
||||||
# ^ source.typst meta.expr.set.typst meta.expr.call.typst meta.brace.round.typst
|
# ^ source.typst meta.expr.set.typst meta.expr.call.typst meta.brace.round.typst
|
||||||
>= <test>
|
>= <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
|
# ^^^^^^ source.typst entity.other.label.typst
|
||||||
>@test
|
>@test
|
||||||
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
||||||
# ^^^^ source.typst entity.other.reference.typst
|
# ^^^^ source.typst entity.other.reference.typst
|
||||||
>= <test->
|
>= <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
|
# ^^^^^^^ source.typst entity.other.label.typst
|
||||||
>@test-
|
>@test-
|
||||||
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
||||||
# ^^^^^ source.typst entity.other.reference.typst
|
# ^^^^^ source.typst entity.other.reference.typst
|
||||||
>= <test:>
|
>= <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
|
# ^^^^^^^ source.typst entity.other.label.typst
|
||||||
>@test:
|
>@test:
|
||||||
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
||||||
# ^^^^^ source.typst entity.other.reference.typst
|
# ^^^^^ source.typst entity.other.reference.typst
|
||||||
>= <test.>
|
>= <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
|
# ^^^^^^^ source.typst entity.other.label.typst
|
||||||
>@test.
|
>@test.
|
||||||
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
||||||
# ^^^^^ source.typst entity.other.reference.typst
|
# ^^^^^ source.typst entity.other.reference.typst
|
||||||
>= <test.1>
|
>= <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
|
# ^^^^^^^^ source.typst entity.other.label.typst
|
||||||
>@test.1
|
>@test.1
|
||||||
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
||||||
# ^^^^^^ source.typst entity.other.reference.typst
|
# ^^^^^^ source.typst entity.other.reference.typst
|
||||||
>= <test:1>
|
>= <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
|
# ^^^^^^^^ source.typst entity.other.label.typst
|
||||||
>@test:1
|
>@test:1
|
||||||
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
||||||
# ^^^^^^ source.typst entity.other.reference.typst
|
# ^^^^^^ source.typst entity.other.reference.typst
|
||||||
>= <test::>
|
>= <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
|
# ^^^^^^^^ source.typst entity.other.label.typst
|
||||||
>@test::
|
>@test::
|
||||||
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
||||||
# ^^^^ source.typst entity.other.reference.typst
|
# ^^^^ source.typst entity.other.reference.typst
|
||||||
# ^^^ source.typst
|
# ^^^ source.typst
|
||||||
>= <typst::World>
|
>= <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
|
# ^^^^^^^^^^^^^^ source.typst entity.other.label.typst
|
||||||
>@typst::World
|
>@typst::World
|
||||||
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
||||||
# ^^^^^^^^^^^^ source.typst entity.other.reference.typst
|
# ^^^^^^^^^^^^ source.typst entity.other.reference.typst
|
||||||
>= <test::.>
|
>= <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
|
# ^^^^^^^^^ source.typst entity.other.label.typst
|
||||||
>@test::. e
|
>@test::. e
|
||||||
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
||||||
# ^^^^ source.typst entity.other.reference.typst
|
# ^^^^ source.typst entity.other.reference.typst
|
||||||
# ^^^^^^ source.typst
|
# ^^^^^^ source.typst
|
||||||
>= <test: :.>
|
>= <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
|
# ^^^^^^^^^^^ source.typst
|
||||||
>@test: :. e
|
>@test: :. e
|
||||||
#^ source.typst entity.other.reference.typst punctuation.definition.reference.typst
|
#^ 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