# Use smart quotes in Markdown cells?

**URL:** <https://talk.observablehq.com/t/use-smart-quotes-in-markdown-cells/4359>\
**Category:** Feedback\
**Created:** [December 21, 2020, 9:12pm UTC](https://talk.observablehq.com/t/use-smart-quotes-in-markdown-cells/4359 "2020-12-21T21:12:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsomers](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/jsomers/32/4049_2.png) [@jsomers](https://talk.observablehq.com/u/jsomers)\
**Post date:** [December 21, 2020, 9:12pm UTC](https://talk.observablehq.com/t/use-smart-quotes-in-markdown-cells/4359/1 "2020-12-21T21:12:59Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![mbostock](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mbostock/32/9_2.png) [@mbostock](https://talk.observablehq.com/u/mbostock)\
**Post date:** [December 22, 2020, 2:57am UTC](https://talk.observablehq.com/t/use-smart-quotes-in-markdown-cells/4359/2 "2020-12-22T02:57:55Z")

</div>

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:

> **[Hello, markdown-it](https://observablehq.com/@mbostock/markdown-it)**
>
> This notebook defines a markdown-it based md tagged template literal that you can import into your notebook. This Markdown implementation is more up-to-date than Observable’s built-in md, and has built-in support for automatic typographic quote...

---

<div class="post-metadata">

**Author:** ![jrus](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/jrus/32/586_2.png) [@jrus](https://talk.observablehq.com/u/jrus)\
**Post date:** [December 22, 2020, 8:00pm UTC](https://talk.observablehq.com/t/use-smart-quotes-in-markdown-cells/4359/3 "2020-12-22T20:00:21Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mootari](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mootari/32/581_2.png) [@mootari](https://talk.observablehq.com/u/mootari)\
**Post date:** [December 22, 2020, 9:19pm UTC](https://talk.observablehq.com/t/use-smart-quotes-in-markdown-cells/4359/4 "2020-12-22T21:19:05Z")

</div>

I guess there’s also the problem that quotation marks are [dependent on the language](https://en.wikipedia.org/wiki/Quotation_mark).

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.

---

<div class="post-metadata">

**Author:** ![jsomers](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/jsomers/32/4049_2.png) [@jsomers](https://talk.observablehq.com/u/jsomers)\
**Post date:** [December 22, 2020, 11:07pm UTC](https://talk.observablehq.com/t/use-smart-quotes-in-markdown-cells/4359/5 "2020-12-22T23:07:35Z")

</div>

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… 😛

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