Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
| for (let i = 0; i < lines.length; i++) { | ||
| const originalLine = lines[i]; | ||
| const trimmedEnd = originalLine.replace(/\s+$/u, ''); | ||
| const fenceMatch = trimmedEnd.trimStart().match(/^(?:```+|~~~+)(.*)$/); | ||
|
|
||
| if (inCodeFence) { |
There was a problem hiding this comment.
Preserve Markdown hard line break spaces
The formatter unconditionally trims all trailing whitespace from every non‑code line (const trimmedEnd = originalLine.replace(/\s+$/u, '')). In Markdown, two trailing spaces before a newline are the canonical way to force a hard line break. Invoking the new Ctrl+Shift+F shortcut on text that relies on this syntax will remove those spaces and the renderer will collapse the break back into the same paragraph, altering the document’s meaning. The formatter should skip trimming when a line intentionally ends with two spaces.
Useful? React with 👍 / 👎.
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68f0765b9bc483308febcb240d24fd80