summary refs log tree commit diff
path: root/nixos/lib
diff options
context:
space:
mode:
authorpennae <github@quasiparticle.net>2023-01-23 21:26:33 +0100
committerpennae <github@quasiparticle.net>2023-01-26 00:38:06 +0100
commit9ff987764cc40a55968b630d245bb8a6991378a7 (patch)
treeaa91672942ed30c2ecd722e4fb5bed9c4bfa6223 /nixos/lib
parentde22a26b4c66fc27b0dbb1f48ed2082305c3de23 (diff)
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.
Diffstat (limited to 'nixos/lib')
-rw-r--r--nixos/lib/make-options-doc/optionsToDocbook.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/nixos/lib/make-options-doc/optionsToDocbook.py b/nixos/lib/make-options-doc/optionsToDocbook.py
index f9b7dd7f2c496..adb009745e33b 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)