nixos/make-option-docs: add xref support to markdown conversion

pennae 645cfa59 7a091b26

Changed files
+4 -1
nixos
lib
make-options-doc
+4 -1
nixos/lib/make-options-doc/mergeJSON.py
···
info = f" language={quoteattr(info)}" if info is not None else ""
return f"<programlisting{info}>\n{escape(text)}</programlisting>"
def link(self, link, text=None, title=None):
+
tag = "link"
if link[0:1] == '#':
+
if text == "":
+
tag = "xref"
attr = "linkend"
link = quoteattr(link[1:])
else:
···
text = ""
attr = "xlink:href"
link = quoteattr(link)
-
return f"<link {attr}={link}>{text}</link>"
+
return f"<{tag} {attr}={link}>{text}</{tag}>"
def list(self, text, ordered, level, start=None):
if ordered:
raise NotImplementedError("ordered lists not supported yet")