fix(team): render team rule markdown in view mode - #121
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 70ad84ec8c
ℹ️ 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".
| } | ||
|
|
||
| const headingPattern = /^(#{1,6})\s+(.+)$/; | ||
| const unorderedListPattern = /^(\s*)[-*]\s+(.+)$/; |
There was a problem hiding this comment.
Render numbered lists as lists
When a team rule uses a numbered Markdown list such as 1. .../2. ..., this pattern does not match it, so parseParagraph treats the consecutive items as one paragraph and joins them with spaces. In view mode that collapses a valid Markdown list into a single line, even though the editor invites users to write Markdown; please recognize ordered-list markers as list blocks too.
Useful? React with 👍 / 👎.
| } | ||
|
|
||
| return ( | ||
| <p className="text-sm leading-7 text-muted-foreground"> |
There was a problem hiding this comment.
Prevent long paragraphs from overflowing
For paragraph-only rule text that contains a long unbroken value such as a repository URL, issue link, or branch name, this preview paragraph lacks the break-words protection that headings and list items have, so the rendered view can overflow the panel instead of wrapping. Adding the same word-breaking behavior here keeps non-list Markdown content within the card.
Useful? React with 👍 / 👎.
Summary
Validation
Closes #120