Frontmatter
| id | 8395 |
| title | Enhance Markdown parser to enforce newlines after headlines |
| state | Closed |
| labels | enhancementai |
| assignees | tobiu |
| createdAt | Jan 7, 2026, 9:32 PM |
| updatedAt | Jan 7, 2026, 9:40 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8395 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | 8362 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 7, 2026, 9:40 PM |
Enhance Markdown parser to enforce newlines after headlines
tobiu added parent issue #8362 on Jan 7, 2026, 9:32 PM
tobiu assigned to @tobiu on Jan 7, 2026, 9:32 PM

tobiu
Jan 7, 2026, 9:40 PM
Input from Gemini 3 Pro:
✦ I have implemented the enhancement to
Neo.component.Markdown. ThemodifyMarkdownmethod now checks if the line following a processed headline is not empty, and if so, inserts an empty line.This ensures that
marked.jscorrectly parses subsequent content (like code blocks or lists) that requires a preceding newline to be recognized as a separate block from the HTML headline.Verified with a standalone test case covering both H1 and H2 scenarios.
tobiu closed this issue on Jan 7, 2026, 9:40 PM
Enhance
Neo.component.Markdown'smodifyMarkdownmethod to automatically ensure a blank line exists after any headline.Currently,
modifyMarkdownconverts# Headerto<h1...>Header</h1>. If the next line is content (e.g., a list or code block),marked.jsoften treats it as part of the HTML block and fails to parse it.We will detect this condition in the parsing loop and inject an empty line where necessary.