Skip to content

fix: fix instance options sent to lexer and parser#3073

Merged
UziTech merged 1 commit intomarkedjs:masterfrom
UziTech:instance-lexer-options
Nov 10, 2023
Merged

fix: fix instance options sent to lexer and parser#3073
UziTech merged 1 commit intomarkedjs:masterfrom
UziTech:instance-lexer-options

Conversation

@UziTech
Copy link
Copy Markdown
Member

@UziTech UziTech commented Nov 3, 2023

Marked version: 9.1.5

Description

Fix instance.lexer setting default options when none passed in.

import { Marked } from 'marked';

const marked = new Marked();

marked.use({
  renderer: {
    heading() {
      return 'test';
    }
  }
});
const tokens = marked.lexer('# hi');
const html = marked.parser(tokens);

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
Copy link
Copy Markdown

vercel bot commented Nov 3, 2023

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 Nov 3, 2023 5:41am

@UziTech UziTech merged commit f9d08cc into markedjs:master Nov 10, 2023
@UziTech UziTech deleted the instance-lexer-options branch November 10, 2023 07:41
github-actions bot pushed a commit that referenced this pull request Nov 10, 2023
## [9.1.6](v9.1.5...v9.1.6) (2023-11-10)

### Bug Fixes

* fix instance options sent to lexer and parser ([#3073](#3073)) ([f9d08cc](f9d08cc))
This was referenced Nov 1, 2025
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.

1 participant