Frontmatter
| id | 8858 |
| title | Markdown component: Exclude code blocks from ticket ID linking |
| state | Closed |
| labels | bugai |
| assignees | tobiu |
| createdAt | Jan 22, 2026, 12:14 AM |
| updatedAt | Jan 22, 2026, 12:15 AM |
| githubUrl | https://github.com/neomjs/neo/issues/8858 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 22, 2026, 12:15 AM |
Markdown component: Exclude code blocks from ticket ID linking
tobiu assigned to @tobiu on Jan 22, 2026, 12:15 AM

tobiu
Jan 22, 2026, 12:15 AM
Input from Gemini 3 Pro:
✦ I have implemented the fix by introducing a masking step in
modifyMarkdown.
- Fenced code blocks (
```...```) are replaced with__NEO_CODE_BLOCK_X__.- Inline code blocks (
...) are replaced with__NEO_INLINE_CODE_X__.- Ticket replacement runs on the masked text.
- The masked tokens are replaced back with the original code.
This prevents
#123inside code blocks (like CSS hex colors or comments) from being turned into links. Changes pushed todevin commit5313b0968.
tobiu closed this issue on Jan 22, 2026, 12:15 AM
The current
replaceTicketIdslogic inNeo.component.Markdownaggressively replaces#123patterns inside code blocks (fenced and inline) with HTML links. This corrupts code examples, especially CSS hex codes or comments containing hashes.We need to update the
modifyMarkdownmethod to:This ensures that only ticket references in the prose text are linked.