1
0
Fork 0

Do not treat line-separated comments as docblocks

This is already handled by the `is-docblock` predicate, but was also needed
here.  In particular, if we have a situation like this:

```xml
<!--
  No a docblock.
-->

<function name="foo">
  <!-- ... -->
</function>
```

we do not want that comment to be considered the docblock of `foo`, since it
does not appear immediately adjacent to it.
master
Mike Gerwitz 2015-09-29 21:27:55 -04:00
parent ab0d0a8e46
commit 5c4059e20a
No known key found for this signature in database
GPG Key ID: F22BB8158EE30EAB
1 changed files with 2 additions and 1 deletions

View File

@ -192,7 +192,8 @@
<param name="context" as="node()" />
<sequence select="( ( $context/preceding-sibling::node()[
not( . instance of text() ) ] )
not( . instance of text()
and . = $xt:nl ) ] )
[ last() ] )
[ . instance of comment() ]" />
</function>