Frontmatter
| id | 8396 |
| title | Enhance Markdown parser to support implicit readonly code blocks |
| state | Closed |
| labels | enhancementai |
| assignees | tobiu |
| createdAt | Jan 7, 2026, 9:46 PM |
| updatedAt | Jan 7, 2026, 9:55 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8396 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | 8362 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 7, 2026, 9:55 PM |
Enhance Markdown parser to support implicit readonly code blocks
tobiu added parent issue #8362 on Jan 7, 2026, 9:46 PM
tobiu assigned to @tobiu on Jan 7, 2026, 9:46 PM

tobiu
Jan 7, 2026, 9:54 PM
Input from Gemini 3 Pro:
✦ I have enhanced
Neo.component.Markdownto support implicit readonly code blocks.Changes:
- Generic Regex: Replaced the restricted
regexReadonlywith a genericregexCodeBlockthat matches any triple-backtick block.- Implicit Readonly: All code blocks are now processed as readonly blocks by default (after
live-previewand other special blocks are extracted).- Smart Defaults: If a language is not specified (e.g.
```) or istext, it defaults toplaintext.- Robust Error Handling: The parser now catches errors from
HighlightJS(e.g., if an unknown language is specified like```java) and automatically falls back toplaintexthighlighting, preventing parser crashes.This simplifies writing markdown for the Portal and Release Notes, as
readonlyflags are no longer required.
tobiu closed this issue on Jan 7, 2026, 9:55 PM
Update
Neo.component.Markdownto treat all code blocks asreadonlyby default, removing the requirement for the explicitreadonlyflag.live-preview,neo-component, andmermaidblocks are already parsed first and replaced with placeholders.```), it will default toplaintext.This simplifies writing markdown for the portal and release notes.