niklasfasching / go-org

Org mode parser with html & pretty printed org rendering. also shitty static site generator.
https://niklasfasching.github.io/go-org/
MIT License
353 stars 48 forks source link

Add support for smart quotes #42

Closed shosti closed 3 years ago

shosti commented 4 years ago

It would be nice to support the "smart quote" export option, with an implementation similar to the typographer Goldmark extension.

niklasfasching commented 4 years ago

open to PRs that don't introduce a crazy amount of complexity. don't think I'll tackle this anytime soon - from the looks that's a lot of heuristics and special cases (see e.g. docutils smart quotes caveats - and how they differ by language) ... there's smartquotes.js in the meantime 🙃

shosti commented 4 years ago

Fair enough, I might take a crack at it at some point :smile:.

pprevos commented 3 years ago

I use the electric-quote-mode for smart quotes.

(add-hook 'org-mode-hook 'electric-quote-mode) (setq electric-quote-replace-double t)

The only little annoyance is that you need to escape it with C-q when you want a straight one in Org Mode code blocks.

niklasfasching commented 3 years ago

Closing as i won't be looking into this. The docutils page on smartquotes scared me away for good. Still open to PRs, just closing as I use issues as my todo list.

facundoolano commented 7 months ago

In case someone else is looking into this, there are some smart quotes implementations in gojekyll, goldmark and blackfriday.

I ended up adapting the gojekyll one to do the replacements directly on the html generated by go-org.