Fix the comment collapse feature

In commit 4abde89 (Use JavaScript to collapse long comments,
2017-04-19), support for collapsing/expanding long comments was added.
This was broken by the recent Markdown support since comments no longer
live inside a single HTML paragraph. Fix this by wrapping each comment
in another div container.

Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
Lukas Fleischer 2017-04-24 18:10:16 +02:00
parent fd880a7a84
commit 4be9aa6350
2 changed files with 21 additions and 18 deletions

View file

@ -103,13 +103,15 @@ if (!isset($count)) {
<?php endif; ?>
</h4>
<div id="<?= isset($pinned) ? "pinned-" : "comment-" ?><?= $row['ID'] ?>-content" class="article-content<?php if ($is_deleted): ?> comment-deleted<?php endif; ?>">
<?php if (!empty($row['RenderedComment'])): ?>
<?= $row['RenderedComment'] ?>
<?php else: ?>
<p>
<?= parse_comment($row['Comments']) ?>
</p>
<?php endif; ?>
<div>
<?php if (!empty($row['RenderedComment'])): ?>
<?= $row['RenderedComment'] ?>
<?php else: ?>
<p>
<?= parse_comment($row['Comments']) ?>
</p>
<?php endif; ?>
</div>
</div>
<?php endwhile; ?>