Frontmatter
| id | 6911 |
| title | Portal.view.learn.ContentComponent: processReadonlyCodeBlocks() => styling for code blocks inside lists |
| state | Closed |
| labels | enhancement |
| assignees | tobiu |
| createdAt | Jun 30, 2025, 5:30 PM |
| updatedAt | Jun 30, 2025, 5:32 PM |
| githubUrl | https://github.com/neomjs/neo/issues/6911 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jun 30, 2025, 5:32 PM |

The current regex cuts off blank chars before a code block starts:
regexReadonly = /```(javascript|html|css|json)\s+readonly\s*\n([\s\S]*?)\n\s*```/g;We could change this via
regexReadonly = /\s*```(javascript|html|css|json)\s+readonly\s*\n([\s\S]*?)\n\s*```/g;but then the highlightJS parser does weird things and adds p tags into the converted code.
Currently it looks like:
I have a more effective fix in mind.