nixosOptionsDoc: refactor

Thanks to Infinisil for pointing this out.
main
Robert Hensing 2 years ago
parent 81a0a8be29
commit 0b02135d3b
  1. 14
      nixos/lib/make-options-doc/options-to-docbook.xsl

@ -22,17 +22,11 @@
<xsl:for-each select="attrs"> <xsl:for-each select="attrs">
<xsl:variable name="id" select=" <xsl:variable name="id" select="
concat('opt-', concat('opt-',
str:replace(str:replace(str:replace(str:replace(str:replace(str:replace(str:replace( translate(
attr[@name = 'name']/string/@value, attr[@name = 'name']/string/@value,
'*', '_'), '*&lt; >[]:',
'&lt;', '_'), '_______'
' ', '_'), ))" />
'>', '_'),
'[', '_'),
']', '_'),
':', '_')
)
" />
<varlistentry> <varlistentry>
<term xlink:href="#{$id}"> <term xlink:href="#{$id}">
<xsl:attribute name="xml:id"><xsl:value-of select="$id"/></xsl:attribute> <xsl:attribute name="xml:id"><xsl:value-of select="$id"/></xsl:attribute>

Loading…
Cancel
Save