Skip to content

Conversation

@quantizor
Copy link
Owner

@quantizor quantizor commented Nov 1, 2025

no real public API changes but...

+---------------------------------+---------------------+----------------------+-----------------------+
|                                 │ 1kB markdown string │ 27kB markdown string │ 211kB markdown string |
+---------------------------------+---------------------+----------------------+-----------------------+
| markdown-to-jsx (next) [parse]  │ 1,339,629 ops/sec   │ 3,078 ops/sec        │ 480 ops/sec           |
+---------------------------------+---------------------+----------------------+-----------------------+
| markdown-to-jsx (8.0.0) [parse] │ 77,081 ops/sec      │ 528 ops/sec          │ 43.66 ops/sec         |
+---------------------------------+---------------------+----------------------+-----------------------+
| rehype [parse]                  │ 12,807 ops/sec      │ 72.13 ops/sec        │ 8.62 ops/sec          |
+---------------------------------+---------------------+----------------------+-----------------------+
| simple-markdown [parse]         │ 132,783 ops/sec     │ 19.57 ops/sec        │ 0.40 ops/sec          |
+---------------------------------+---------------------+----------------------+-----------------------+
| markdown-it [parse]             │ 695,438 ops/sec     │ 2,659 ops/sec        │ 364 ops/sec           |
+---------------------------------+---------------------+----------------------+-----------------------+
| markdown-to-jsx (next) [jsx]    │ 327,998 ops/sec     │ 1,166 ops/sec        │ 196 ops/sec           |
+---------------------------------+---------------------+----------------------+-----------------------+
| markdown-to-jsx (8.0.0) [jsx]   │ 62,521 ops/sec      │ 423 ops/sec          │ 39.10 ops/sec         |
+---------------------------------+---------------------+----------------------+-----------------------+
| rehype [jsx]                    │ 13,684 ops/sec      │ 71.01 ops/sec        │ 6.34 ops/sec          |
+---------------------------------+---------------------+----------------------+-----------------------+
| simple-markdown [jsx]           │ 135,471 ops/sec     │ 19.04 ops/sec        │ 0.40 ops/sec          |
+---------------------------------+---------------------+----------------------+-----------------------+
| react-markdown [jsx]            │ 24,810 ops/sec      │ 117 ops/sec          │ 12.90 ops/sec         |
+---------------------------------+---------------------+----------------------+-----------------------+

yeah


Note

Major v9 rewrite introducing new core structure, build system, demo site, tooling, and package exports while removing legacy code/tests.

  • Core/Structure:
    • Remove legacy implementation/tests (e.g., index.tsx, large spec files) and adopt new v9 structure (consuming from src/react, src/html, src/markdown).
  • Build/Packaging:
    • Add bunup.config.ts and plugin to strip debug code; update bunfig.toml.
    • Overhaul package.json: Node >=18, modern deps, new exports (./react, ./html, ./markdown), scripts for build/dev/bench/metrics.
  • Docs/Site:
    • Replace docs/index.html; implement new demo app in site.tsx with syntax highlighting, presets, and visuals.
    • Add public assets and comprehensive README.
  • Tooling/Scripts:
    • Add benchmarking, profiling, metrics, entity/fixture generators, and AST debug-stripping build plugin.
  • CI/Config:
    • Add CodeQL and workflow files; update project configs.

Written by Cursor Bugbot for commit c6b45e0. This will update automatically on new commits. Configure here.

@changeset-bot
Copy link

changeset-bot bot commented Nov 1, 2025

🦋 Changeset detected

Latest commit: c6b45e0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
markdown-to-jsx Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@socket-security
Copy link

socket-security bot commented Nov 1, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​types/​react@​17.0.90 ⏵ 19.2.6100 +110079 +296100
Updated@​types/​node@​20.19.25 ⏵ 24.10.1100 +110081 +195100
Updatedrimraf@​5.0.10 ⏵ 6.1.2100 +110010090100
Updatedreact-dom@​17.0.2 ⏵ 19.2.0100 +110092 +398100
Addedprettier@​3.6.29910010095100

View full report

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@quantizor quantizor marked this pull request as draft November 1, 2025 18:36
@quantizor quantizor changed the title near-total rewrite rewrite for spec compliance and speed Nov 17, 2025
@quantizor quantizor changed the title rewrite for spec compliance and speed v9: rewrite for spec compliance and speed Nov 17, 2025
@quantizor quantizor force-pushed the maintain branch 2 times, most recently from f137764 to 10f758a Compare November 18, 2025 03:21
markdown-to-jsx is now 100% gfm & commonmark compliant, while being
more than 10x faster depending on the benchmark at all input
sizes

it is the fastest markdown parser... maybe ever? definitely the
fastest javascript-based markdown parser

to achieve this there were some tradeoffs, notably the bundle size

if we dropped html entity compliance down to the absolute bare minimum,
the library would be much smaller and still much larger than earlier majors

however, I think in 2025 the performance is more worthwhile and enables fun
scenarios like butter-smooth live authoring

plus now you can use the parser directly and build your own renderer if you want
@quantizor quantizor force-pushed the maintain branch 2 times, most recently from 7d1c79b to 4455491 Compare November 18, 2025 05:14
@quantizor
Copy link
Owner Author

markdown-to-jsx@prerelease is pushed to npm if anyone wants to try out v9!

@quantizor quantizor marked this pull request as ready for review November 21, 2025 06:55
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.

2 participants