You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inline raw text containing $ breaks a following inline equation in word-level diff #58
Use `#diff-deleted[$HOME` and $x]#diff-added[$PATH` and$y]$ here.
typst compile fails with:
error: unknown variable: PATH
Cause
tokenize_mixed doesn't know about raw text. The $ inside the backticks is taken as the start of an inline equation, and find_closing_dollar scans forward to the opening $ of $x$. The resulting token runs across the closing backtick, so the raw delimiters and the equation delimiters end up split across #diff-*[...] calls.
When there's no later $ in the paragraph, the unclosed-$ fallback added in #26 keeps the output valid. That's why `$HOME` on its own works.
Possible fix
Treat inline raw text as an atomic token in tokenize_mixed before the $ branch is reached, so a $ inside backticks is never seen as an equation delimiter. #28 adds this via TypstRaw::end.
Once that lands, test_tokenize_unclosed_dollar_is_single_token will need its expected tokens updated, since `$HOME` will become a single token.
Activity