Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

UziTech
Copy link
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.

Copy link

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

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.

None yet

1 participant