diff options
author | W. Trevor King <wking@tremily.us> | 2013-03-12 23:04:56 -0400 |
---|---|---|
committer | W. Trevor King <wking@tremily.us> | 2013-03-12 23:04:56 -0400 |
commit | f41908a1f7b5a100ae1f4f143ac8f150d1d83f73 (patch) | |
tree | c4736d950ac1f9f34ed6b157f26307acd57424dc /.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/ae998b27-a11b-4243-abf6-11841e5b8242 | |
parent | ec2f5d26bc84a93feef9c31fb06486b50a59b14a (diff) | |
download | bugseverywhere-f41908a1f7b5a100ae1f4f143ac8f150d1d83f73.tar.gz |
command:html: Rework comment <div> closing
Comment nesting wasn't working properly before, where you could get
things like:
<div class="comment root" id="a">
</div> <!-- close a -->
<div class="comment" id="a/b">
<div class="comment" id="a/b/c">
<div class="comment root" id="d">
</div> <!-- close d -->
</div> <!-- close a/b/c -->
</div> <!-- close a/b -->
from a comment tree (using fake ids) of:
.
|-- a
| `-- a/b
| `-- a/b/c
`-- d
The new handling pushes the `div_close(depth)` call to the front of
the comment block, because a comment's depth tells us how many of the
already-rendered comments we need to close. Closing comments at the
top of the block means that we'll always have at least one unclosed
comment to close after the comment loop completes. With the new
handling, we'll get a more appropriate:
<div class="comment root" id="a">
<div class="comment" id="a/b">
<div class="comment" id="a/b/c">
</div> <!-- close a/b/c -->
</div> <!-- close a/b -->
</div> <!-- close a -->
<div class="comment root" id="C29a03522-ed6e-4a9a-8823-23a1c513865f">
</div> <!-- close d -->
Reported-by: Owen Jacobson <owen.jacobson@grimoire.ca>
Diffstat (limited to '.be/bea86499-824e-4e77-b085-2d581fa9ccab/bugs/ae998b27-a11b-4243-abf6-11841e5b8242')
0 files changed, 0 insertions, 0 deletions