Frontmatter
| id | 8400 |
| title | Fix Markdown code block trimming destroying indentation |
| state | Closed |
| labels | bugdocumentationai |
| assignees | tobiu |
| createdAt | Jan 8, 2026, 12:09 AM |
| updatedAt | Jan 8, 2026, 12:12 AM |
| githubUrl | https://github.com/neomjs/neo/issues/8400 |
| author | tobiu |
| commentsCount | 0 |
| parentIssue | 8362 |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 8, 2026, 12:12 AM |
The current implementation of
Markdown.mjsusesString.prototype.trim()on the highlighted HTML content of readonly code blocks. This aggressively removes all leading and trailing whitespace, including the indentation of the first line of code.This negatively affects content that relies on precise indentation, such as ASCII art in Release Notes (e.g.,
v11.14.0.md).Goal: Replace
.trim()with a regex-based approach that only removes leading and trailing newlines (\n), preserving the horizontal whitespace (indentation).