From 9ff987764cc40a55968b630d245bb8a6991378a7 Mon Sep 17 00:00:00 2001 From: pennae Date: Mon, 23 Jan 2023 21:26:33 +0100 Subject: [PATCH] nixos/make-options-doc: enable smartquotes and replacements the rest of the nixos manual has them enabled, so we should enable them here too for consistency. this changes rendered output pervasively. changes also include quotes in types (eg in `strings concatenated with "\n"`), but since those are not code this is probably fine. if not we can probably add a myst role to inhibit replacements. --- nixos/lib/make-options-doc/optionsToDocbook.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/lib/make-options-doc/optionsToDocbook.py b/nixos/lib/make-options-doc/optionsToDocbook.py index f9b7dd7f2c49..adb009745e33 100644 --- a/nixos/lib/make-options-doc/optionsToDocbook.py +++ b/nixos/lib/make-options-doc/optionsToDocbook.py @@ -199,6 +199,7 @@ class Converter: { 'maxNesting': 100, # default is 20 'html': False, # not useful since we target many formats + 'typographer': True, # required for smartquotes }, renderer_cls=Renderer ) @@ -208,6 +209,7 @@ class Converter: self._md.use(container_plugin, name="{.warning}") self._md.use(deflist_plugin) self._md.use(myst_role_plugin) + self._md.enable(["smartquotes", "replacements"]) self._manpage_urls = frozendict(manpage_urls)