Use smart quotes in Markdown cells?

I was surprised to find that in markdown cells, typing "something like this" renders straight-quotes; same deal for apostrophes. These are especially noticeable given just how curly the body font makes curly quotes. Can the site instead convert to HTML using smart quotes by default?

2 Likes

We donā€™t currently support automatic typographic quotes, but weā€™re planning on making some upgrades to our built-in Markdown tagged template literal (md) in the nearish future. One of the challenges is that we donā€™t want to change the behavior of existing notebooks.

If you donā€™t mind adding an import to your notebook, you can import a more full-featured Markdown parser that supports typographic quote conversion. For example, markdown-it:

Please donā€™t ever make the standard md template apply this kind of ā€œhelpfulā€ feature. Someone who wants smart quotes can easily either type them explicitly (either by setting their computer to do it automatically, or by using an explicit key binding for it), or can find their own javascript code to do it to their templates, but often straight quotes are desired and needing to go to extra effort to avoid someoneā€™s clever DWIM features when they go wrong is always a huge pain.

5 Likes

I guess thereā€™s also the problem that quotation marks are dependent on the language.

While I would have loved some built-in typographical helpers, I donā€™t see how they could be added without also adding full customization support.

Thatā€™s great, thanks! I think Iā€™ll stick with the default parser for now because, perversely, Iā€™m using some raw HTML embedded in the Markdownā€¦ :stuck_out_tongue:

But in the future, using an import like this seems simple and effective.