GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix(id): keep pipes inside code spans from splitting table cells by dezren39 · Pull Request #1688 · developing-today/code Conversation
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 34 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 3895a26663
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if is_table_delimiter_row(line) { | ||
| in_table = true; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Exclude code blocks from table detection
When a fenced code block contains a Markdown table example, the delimiter inside the fence sets in_table and the preprocessor inserts backslashes into the block's literal contents. For example, a fenced block containing | H |\n| --- |\n| a|b | now gets a\|b in its code-block text. Indented code blocks are affected too because delimiter detection trims indentation. Since convert_node preserves code-block literals, opening and saving such a document silently changes its contents. Skip fenced and indented code contexts before recognizing table headers or delimiters.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if in_table && line.trim().is_empty() { | ||
| in_table = false; | ||
| } |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Stop escaping when another block interrupts the table
For a valid table followed immediately by another block, in_table remains true until a blank line even though the Markdown parser has already ended the table. For example, | H |\n| --- |\n| A |\n# a|b\n causes the heading's code span to become a\|b; outside table cells that backslash is literal, so the heading's content is corrupted. Reset table state when a heading, fence, or other interrupting block begins, rather than treating every nonblank subsequent line as a table row.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if bytes[i] == b'`' && !byte_is_escaped(bytes, i) { | ||
| let mut run = 0; | ||
| while i + run < bytes.len() && bytes[i + run] == b'`' { | ||
| run += 1; |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Skip link destinations when identifying code-span openers
For a valid two-column table row such as | [a](https://example.com/`) | [b](https://example.com/`) |, the backticks belong to link destinations, not code spans. This scanner nevertheless pairs them and escapes the structural pipe between the links. The resulting row puts both links into the first cell and leaves the second cell empty, silently changing an existing valid table. Account for inline link destinations before treating their backticks as code-span delimiters.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| let mut j = i + run; | ||
| while j < bytes.len() { | ||
| if bytes[j] == b'`' { | ||
| let mut r = 0; | ||
| while j + r < bytes.len() && bytes[j + r] == b'`' { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Avoid rescanning suffixes for unmatched backtick runs
For a table row containing distinct backtick runs of lengths 1 through N, separated by ordinary characters, every run is unmatched and this loop scans the remaining row again for each opener. An optimized standalone run of this helper took approximately 14 seconds to preprocess an 8 MB row with 4,000 such runs. CollabState::get_or_create holds the shared documents write lock while invoking this conversion through Document::with_content (collab.rs:329–335), so opening such Markdown also stalls other document opens. Index backtick runs or cache failed searches to avoid repeatedly scanning the same suffix.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
id(web): a pipe inside an inline code span in a table cell splits the cell on open — code mark destroyed, phantom column, trailing fragment dropped
There was an error while loading. Please reload this page.