Skip to content

Conversation

@rwv
Copy link

@rwv rwv commented Jan 7, 2026

What

  • Add NMarkdown runtime Markdown renderer (token -> VNode).
  • Support code blocks with injected highlight.js (same pattern as NCode).
  • Add sanitize options: sanitize (default true) strips unsafe URLs and escapes raw HTML; sanitizeHtml hook enables rendering sanitized HTML when needed.
  • Add demos (basic/hljs/security) and unit tests.

@jahnli
Copy link
Collaborator

jahnli commented Jan 9, 2026

👍

@@ -0,0 +1,468 @@
import type { Token, Tokens } from 'marked'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • prefer https://unifiedjs.com/ remarkjs stack
  • due to package size, Naive UI doesn't include the package
  • the approach should be like n-code n-hilight n-equation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants