mirror of
https://github.com/outline/outline.git
synced 2026-12-05 02:44:34 +03:00
fix: Skip math content in tables rule to preserve LaTeX escape sequences (#11134)
Fixes #10255 where LaTeX commands containing \n (like \neg, \neq, \nu) were being incorrectly interpreted as newline characters when pasted. The tables rule was processing all inline content and splitting on \n sequences, which broke LaTeX math expressions. This fix skips processing for math_inline tokens, similar to the existing skip for code_inline. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6c3a0f7cb3
commit
ae59a8b25e
1 file changed
+6
@@ -24,6 +24,12 @@ export default function markdownTables(md: MarkdownIt): void {
|
||||
tokens[i].children = [];
|
||||
|
||||
existing.forEach((child) => {
|
||||
// Skip processing math content to preserve LaTeX escape sequences
|
||||
if (child.type === "math_inline") {
|
||||
tokens[i].children?.push(child);
|
||||
return;
|
||||
}
|
||||
|
||||
let content = child.content;
|
||||
|
||||
// First handle <br> tags
|
||||
|
||||
Reference in new issue
Block a user