Skip to content

Conversation

@mvogttech
Copy link
Contributor

Summary

  • add a Ctrl+Shift+F shortcut that reformats the current document using a new Markdown formatter
  • update the editor buffer to accept external content updates and track history when formatting is applied
  • document the shortcut and configuration along with unit tests covering the formatter and config defaults

Testing

  • npm test -- tests/unit

https://chatgpt.com/codex/tasks/task_e_68f0765b9bc483308febcb240d24fd80

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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

Comment on lines +94 to +97
for (let i = 0; i < lines.length; i++) {
const rawLine = lines[i];
const trimmedRight = rawLine.replace(/\s+$/, '');
const trimmed = trimmedRight.trim();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve Markdown hard line breaks

The formatter unconditionally removes trailing whitespace from every line (rawLine.replace(/\s+$/, '')). In Markdown, a line ending with two spaces is a deliberate hard line break and should be preserved. Running Ctrl+Shift+F on content that uses this convention (e.g. "First line␠␠\nSecond line") will erase the spaces and change the rendered output by merging the lines. The formatter should either keep the double spaces or translate them to an explicit <br>/\ escape instead of stripping them.

Useful? React with 👍 / 👎.

@mvogttech mvogttech closed this Oct 17, 2025
@mvogttech mvogttech deleted the codex/add-auto-format-command-for-markdown branch October 17, 2025 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants