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

feature: Allow use of markdown-it as the markdown parser #313

Open
danishcake opened this issue Sep 12, 2024 · 1 comment · May be fixed by #314
Open

feature: Allow use of markdown-it as the markdown parser #313

danishcake opened this issue Sep 12, 2024 · 1 comment · May be fixed by #314
Labels

Comments

@danishcake
Copy link

Problem:

Marked is a fine markdown parser, but markdown-it is the parser used by Visual Studio Code, so there's a much larger number of plugins available.

When authoring markdown using Visual Studio Code, rendering using markdown-it would allow the preview to be a close approximation for the output pdf.

Solution:

  1. Add options for markdown-it in BasicConfig:
	markdown_parser: 'marked' | 'markdown-it';
	markdown_it_options: MarkdownIt.Options;
	markdown_it_plugins: MarkdownIt.PluginSimple[];
  1. Add a new file get-markdown-it-with-highlighter.ts that returns a markdown-it instance that is roughly comparable to the default marked instance. Call this from getHtml when configured with markdown-it.
  2. Add required plumbing, tests and examples for how to use markdown-it extensions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@danishcake and others