tinymist/syntaxes/textmate/tests/unit/basic/hash-cont.typ.snap
Myriad-Dreamin 5bf177637a
Some checks are pending
tinymist::ci / Duplicate Actions Detection (push) Waiting to run
tinymist::ci / E2E Tests (win32-x64 on windows-latest) (push) Blocked by required conditions
tinymist::ci / prepare-build (push) Waiting to run
tinymist::ci / build-binary (push) Blocked by required conditions
tinymist::ci / build-vsc-assets (push) Blocked by required conditions
tinymist::ci / build-vscode (push) Blocked by required conditions
tinymist::ci / build-vscode-others (push) Blocked by required conditions
tinymist::ci / publish-vscode (push) Blocked by required conditions
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Waiting to run
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Waiting to run
tinymist::ci / E2E Tests (darwin-arm64 on macos-latest) (push) Blocked by required conditions
tinymist::ci / E2E Tests (linux-x64 on ubuntu-22.04) (push) Blocked by required conditions
tinymist::ci / E2E Tests (linux-x64 on ubuntu-latest) (push) Blocked by required conditions
tinymist::ci / E2E Tests (win32-x64 on windows-2019) (push) Blocked by required conditions
tinymist::gh_pages / build-gh-pages (push) Waiting to run
fix: stop hash expressions before "operators" (#1756)
* fix: distinguish markup math and code math

* fix: stop hash expressions before "operators"

* fix: corner cases
2025-05-13 18:06:19 +08:00

55 lines
No EOL
3.1 KiB
Text

>#let k = 0;
#^ source.typst keyword.control.hash.typst
# ^^^ source.typst meta.expr.let.typst storage.type.typst
# ^ source.typst meta.expr.let.typst
# ^ source.typst meta.expr.let.typst variable.other.readwrite.typst
# ^ source.typst meta.expr.let.typst
# ^^ source.typst meta.expr.let.typst keyword.operator.assignment.typst
# ^ source.typst meta.expr.let.typst constant.numeric.integer.typst
# ^ source.typst punctuation.terminator.statement.typst
>$#k=0$
#^ source.typst markup.math.typst punctuation.definition.string.begin.math.typst
# ^ source.typst markup.math.typst variable.other.readwrite.hash.typst
# ^ source.typst markup.math.typst variable.other.readwrite.typst
# ^^ source.typst markup.math.typst
# ^ source.typst markup.math.typst punctuation.definition.string.end.math.typst
>$#k+0$
#^ source.typst markup.math.typst punctuation.definition.string.begin.math.typst
# ^ source.typst markup.math.typst variable.other.readwrite.hash.typst
# ^ source.typst markup.math.typst variable.other.readwrite.typst
# ^^ source.typst markup.math.typst
# ^ source.typst markup.math.typst punctuation.definition.string.end.math.typst
>$#k*0$
#^ source.typst markup.math.typst punctuation.definition.string.begin.math.typst
# ^ source.typst markup.math.typst variable.other.readwrite.hash.typst
# ^ source.typst markup.math.typst variable.other.readwrite.typst
# ^^ source.typst markup.math.typst
# ^ source.typst markup.math.typst punctuation.definition.string.end.math.typst
>$#k/0$
#^ source.typst markup.math.typst punctuation.definition.string.begin.math.typst
# ^ source.typst markup.math.typst variable.other.readwrite.hash.typst
# ^ source.typst markup.math.typst variable.other.readwrite.typst
# ^ source.typst markup.math.typst punctuation.math.operator.typst
# ^ source.typst markup.math.typst
# ^ source.typst markup.math.typst punctuation.definition.string.end.math.typst
>$#k&0$
#^ source.typst markup.math.typst punctuation.definition.string.begin.math.typst
# ^ source.typst markup.math.typst variable.other.readwrite.hash.typst
# ^ source.typst markup.math.typst variable.other.readwrite.typst
# ^ source.typst markup.math.typst
# ^ source.typst markup.math.typst constant.numeric.integer.typst
# ^ source.typst markup.math.typst punctuation.definition.string.end.math.typst
>$#k.0$
#^ source.typst markup.math.typst punctuation.definition.string.begin.math.typst
# ^ source.typst markup.math.typst variable.other.readwrite.hash.typst
# ^ source.typst markup.math.typst variable.other.readwrite.typst
# ^^ source.typst markup.math.typst constant.numeric.float.typst
# ^ source.typst markup.math.typst punctuation.definition.string.end.math.typst
>$#k{0$
#^ source.typst markup.math.typst punctuation.definition.string.begin.math.typst
# ^ source.typst markup.math.typst variable.other.readwrite.hash.typst
# ^ source.typst markup.math.typst variable.other.readwrite.typst
# ^ source.typst markup.math.typst markup.content.brace.typst
# ^ source.typst markup.math.typst
# ^ source.typst markup.math.typst punctuation.definition.string.end.math.typst
>