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-web): preserve spaced link/image destinations in angle form on save (#1019) by dezren39 · Pull Request #1022 · 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 59 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: 6e3c3c0287
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.
| let mut output = String::new(); | ||
| format_commonmark(root, &commonmark_options(), &mut output)?; | ||
| for (placeholder, raw) in substitutions { | ||
| output = output.replace(&placeholder, &format!("<{raw}>")); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Escape destinations before restoring angle-form links
When a spaced destination also contains Markdown-sensitive characters, interpolating the decoded URL directly into <...> produces invalid or semantically different Markdown. For example, valid [t](<a b\>c.md>) parses to href a b>c.md, but saving now emits [t](<a b>c.md>); the premature > prevents the link from parsing, so reopening loses its link mark. Images are affected too. Escape the destination for angle-form Markdown before restoring it.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| for (placeholder, raw) in substitutions { | ||
| output = output.replace(&placeholder, &format!("<{raw}>")); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Prevent placeholder replacement from modifying document content
When a document contains both a spaced destination and the literal placeholder string, this global replacement silently changes unrelated content. For example, saving [notes](<my notes.md>) alongside inline code containing idweb-spaced-destination-0-placeholder rewrites that code to <my notes.md>. The deterministic tokens are not checked against document content, and replacement also affects ordinary text, titles, and other URLs. Use collision-checked placeholders or restrict restoration to the generated destination occurrences.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…d-destinations # Conflicts: # pkgs/id/src/web/markdown.rs
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): link/image destinations with a space are silently rewritten to %20 on save — angle-bracket form lost, relative file links break
There was an error while loading. Please reload this page.