November 30, 2020
Marked.js is a library for parsing Markdown into HTML.
I personally think that curly or "smart" quotes look better in writing, like this:
"straight quotes"
“curly quotes”
straight apostrophe: they're
curly apostrophe: they’re
To turn straight quotes into curly quotes when parsing with Marked.js, use the setOptions
function to turn "smartypants" rendering on:
marked.setOptions({ smartypants: true });
marked.parse(/* markdown content */);
Now, marked.parse
will produce HTML with intelligently replaced curly quotes.
Tufts Meal Plan Wrapped
Mar 2, 2024
Building an e-ink picture frame that displays an iCloud photo album
Jan 9, 2024
2023 in review
Jan 5, 2024
Subscribe to my newsletter for a monthly round-up of new blog posts and projects I’m working on!