LearnNewsExamplesServices
Frontmatter
id6911
titlePortal.view.learn.ContentComponent: processReadonlyCodeBlocks() => styling for code blocks inside lists
stateClosed
labels
enhancement
assigneestobiu
createdAtJun 30, 2025, 5:30 PM
updatedAtJun 30, 2025, 5:32 PM
githubUrlhttps://github.com/neomjs/neo/issues/6911
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 30, 2025, 5:32 PM

Portal.view.learn.ContentComponent: processReadonlyCodeBlocks() => styling for code blocks inside lists

Closed v10.0.0-beta.3 enhancement
tobiu
tobiu commented on Jun 30, 2025, 5:30 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:

Image

I have a more effective fix in mind.

tobiu assigned to @tobiu on Jun 30, 2025, 5:30 PM
tobiu added the enhancement label on Jun 30, 2025, 5:30 PM
tobiu referenced in commit f3c7573 - "Portal.view.learn.ContentComponent: processReadonlyCodeBlocks() => styling for code blocks inside lists #6911" on Jun 30, 2025, 5:32 PM
tobiu
tobiu Jun 30, 2025, 5:32 PM
Image
tobiu closed this issue on Jun 30, 2025, 5:32 PM