Mike Gerwitz

Activist for User Freedom

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mtg@gnu.org>2015-09-28 23:59:33 -0400
committerMike Gerwitz <mtg@gnu.org>2015-09-28 23:59:34 -0400
commitc3d0839b9ae457af2df3b0029461f243148f35ec (patch)
treeaa4a9d4a48bc82980c17b8a72d1acf8a1513852c
parent88b1a9ba49b1c070987753aff8d7a531d205a0d7 (diff)
downloadliterate-xsl-c3d0839b9ae457af2df3b0029461f243148f35ec.tar.gz
literate-xsl-c3d0839b9ae457af2df3b0029461f243148f35ec.tar.bz2
literate-xsl-c3d0839b9ae457af2df3b0029461f243148f35ec.zip
Prevent reading preceding sibling's docblock
-rw-r--r--src/texinfo.xsl6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/texinfo.xsl b/src/texinfo.xsl
index f17cf5f..9c3fe5d 100644
--- a/src/texinfo.xsl
+++ b/src/texinfo.xsl
@@ -189,8 +189,10 @@
<function name="xt:get-docblock" as="comment()?">
<param name="context" as="node()" />
- <sequence select="$context/preceding-sibling::comment()[1][
- xt:is-docblock( . ) ]" />
+ <sequence select="( ( $context/preceding-sibling::node()[
+ not( . instance of text() ) ] )
+ [ last() ] )
+ [ . instance of comment() ]" />
</function>