Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,15 @@ fn tokenize_mixed(s: &str) -> Vec<&str> {
// Standalone '#'
tokens.push(&s[start..i]);
}
} else if c == '$' {
// Inline equation: keep `$...$` as one atomic token
let start = i;
i += 1;
match s[i..].find('$') {
Some(off) => i += off + 1,
None => i = s.len(),
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
}
tokens.push(&s[start..i]);
Comment thread
Copilot marked this conversation as resolved.
Comment thread
Copilot marked this conversation as resolved.
} else if c == '@' {
// Typst reference: @label (alphanumeric, hyphens, underscores, colons, periods)
let start = i;
Expand Down