Add voice command for inserting markdown table headers - #2309
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8525612ce6
ℹ️ 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 "@codex address that feedback".
| snippet_body = "".join(snippet_body_parts) | ||
| # directly insert the snippet body. | ||
| # Because the number of placeholders varies, we could not do this in a .snippet file. | ||
| actions.user.insert_snippet(snippet_body) |
There was a problem hiding this comment.
Add a final snippet stop after the separator
In the default snippet backend used outside VS Code, go_to_next_stop_raw() only moves when another stop exists and otherwise clears the stop stack. Because this generated body ends after the separator without a $0 stop, table header one has no saved next stop at all, and for larger tables the final snip next does nothing, leaving the cursor in the last header cell instead of moving past the separator. Append $0 at the end or use the existing final-stop insertion path.
Useful? React with 👍 / 👎.
This inserts the table header for a markdown table with the given number of columns. It builds a temporary snippet to insert to take advantage of
snip next. Note that we could not put this in a .snippet file because the number of placeholders depends on the number of columns.