Skip to content

feat: add provideLexer and provideParser hooks#3424

Merged
UziTech merged 8 commits into
markedjs:masterfrom
UziTech:provide-lexer
Aug 26, 2024
Merged

feat: add provideLexer and provideParser hooks#3424
UziTech merged 8 commits into
markedjs:masterfrom
UziTech:provide-lexer

Conversation

@UziTech

@UziTech UziTech commented Aug 21, 2024

Copy link
Copy Markdown
Member

Marked version: 14.0.0

Description

Add provideLexer and provideParser hooks to allow extensions that need to change the lexer or parser. This will allow adding links to the Lexer for chunked rendering (#3315). This will also allow extensions to create a new Parser to return something other than an html string. The Parser could return dom elements or react/vue/angular components.

Contributor

  • Test(s) exist to ensure functionality and minimize regression (if no tests added, list tests covering this PR); or,
  • no tests required for this PR.
  • If submitting new feature, it has been documented in the appropriate places.

Committer

In most cases, this should be a different person than the contributor.

@vercel

vercel Bot commented Aug 21, 2024

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marked-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 22, 2024 6:52pm

Comment thread docs/USING_PRO.md Outdated
Comment thread src/Instance.ts
Comment thread src/Instance.ts
Comment thread docs/USING_PRO.md Outdated

@calculuschild calculuschild left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. Just the one typo

@UziTech UziTech merged commit 447f5af into markedjs:master Aug 26, 2024
@UziTech UziTech deleted the provide-lexer branch August 26, 2024 03:53
github-actions Bot pushed a commit that referenced this pull request Aug 26, 2024
# [14.1.0](v14.0.0...v14.1.0) (2024-08-26)

### Bug Fixes

* don't export block or inline ([#3427](#3427)) ([3f0430a](3f0430a))

### Features

* add provideLexer and provideParser hooks ([#3424](#3424)) ([447f5af](447f5af))
Logiclayer1111 pushed a commit to Logiclayer1111/marked that referenced this pull request Apr 20, 2026
# [14.1.0](markedjs/marked@v14.0.0...v14.1.0) (2024-08-26)

### Bug Fixes

* don't export block or inline ([#3427](markedjs/marked#3427)) ([cafb3c9](markedjs/marked@cafb3c9))

### Features

* add provideLexer and provideParser hooks ([#3424](markedjs/marked#3424)) ([407c34f](markedjs/marked@407c34f))
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.

Support for chunked rendering

5 participants