Skip to content

Commit

Permalink
[manpage] Fix linebreak and indentation of lists
Browse files Browse the repository at this point in the history
  • Loading branch information
eldarnash committed Nov 6, 2023
1 parent a9fcf48 commit ec70c12
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions scripts/xhtml2man.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,19 @@ This article was written by:
<xsl:apply-templates select="*|text()"/>
</xsl:template>

<xsl:template match="xhtml:li/xhtml:p">
<!-- Do not add .PP for first child paragraph, add .IP for others -->
<xsl:choose>
<xsl:when test="preceding-sibling::*">
.IP
<xsl:apply-templates select="*|text()"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="*|text()"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="text()"><xsl:value-of select="."/></xsl:template>

<xsl:template match="xhtml:a[@href]">\fB<xsl:apply-templates select="*|text()"/>\fP (\fI<xsl:value-of select="@href"/>\fP)</xsl:template>
Expand Down

0 comments on commit ec70c12

Please sign in to comment.