-
Notifications
You must be signed in to change notification settings - Fork 27
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
There is an error when trying to pass options as parse
argument
#2
Comments
Try just: let options: MarkedOptions = {isNoP: true};
Marked.setOptions(options);
Marked.parse("some intput"); |
Agree, but I have two functions one with options second without, and have at the beginning of each call |
@marioosh, you can get all default options when call import { Marked, MarkedOptions } from 'marked-ts';
const options1 = new MarkedOptions;
options1.isNoP = true;
const html1 = Marked.parse("some intput", options1);
const options2 = new MarkedOptions;
options2.isNoP = false;
const html2 = Marked.parse("some intput", options2);
console.log(html1); // some intput
console.log(html2); // <p>some intput</p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: