summary refs log tree commit diff
path: root/nixos/lib/make-options-doc
diff options
context:
space:
mode:
authorpennae <github@quasiparticle.net>2023-01-18 01:04:21 +0100
committerpennae <82953136+pennae@users.noreply.github.com>2023-01-22 17:50:09 +0100
commitd1aa187c0e1fa3a91d1204b810794cc0f1d17842 (patch)
treee20f33be922549ce181c0ab9aea8ec54bece63d9 /nixos/lib/make-options-doc
parent2cb43da5870b6f0d3beb64afdce3cb8a04a071fc (diff)
downloadnixpkgs-d1aa187c0e1fa3a91d1204b810794cc0f1d17842.tar
nixpkgs-d1aa187c0e1fa3a91d1204b810794cc0f1d17842.tar.gz
nixpkgs-d1aa187c0e1fa3a91d1204b810794cc0f1d17842.tar.bz2
nixpkgs-d1aa187c0e1fa3a91d1204b810794cc0f1d17842.tar.lz
nixpkgs-d1aa187c0e1fa3a91d1204b810794cc0f1d17842.tar.xz
nixpkgs-d1aa187c0e1fa3a91d1204b810794cc0f1d17842.tar.zst
nixpkgs-d1aa187c0e1fa3a91d1204b810794cc0f1d17842.zip
nixos/make-options-doc: don't escape link urls twice
mistune already does escaping. it does escaping for html, but the
difference is small enough that can just ignore that we're actually
targeting docbook here.
Diffstat (limited to 'nixos/lib/make-options-doc')
-rw-r--r--nixos/lib/make-options-doc/mergeJSON.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/nixos/lib/make-options-doc/mergeJSON.py b/nixos/lib/make-options-doc/mergeJSON.py
index c27cd9d3c6d..db14808e84e 100644
--- a/nixos/lib/make-options-doc/mergeJSON.py
+++ b/nixos/lib/make-options-doc/mergeJSON.py
@@ -80,15 +80,14 @@ class Renderer(mistune.renderers.BaseRenderer):
             if text == "":
                 tag = "xref"
             attr = "linkend"
-            link = quoteattr(link[1:])
+            link = link[1:]
         else:
             # try to faithfully reproduce links that were of the form <link href="..."/>
             # in docbook format
             if text == link:
                 text = ""
             attr = "xlink:href"
-            link = quoteattr(link)
-        return f"<{tag} {attr}={link}>{text}</{tag}>"
+        return f"<{tag} {attr}=\"{link}\">{text}</{tag}>"
     def list(self, text, ordered, level, start=None):
         if ordered:
             raise NotImplementedError("ordered lists not supported yet")