summaryrefslogtreecommitdiffstats
path: root/web/template
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2017-04-24 18:10:16 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2017-04-24 21:10:02 +0200
commit4be9aa6350430703383b9df26be2aa37ce840cdc (patch)
treea392c0e7ce4907c1430b5a6ae9b0609796af5e43 /web/template
parentfd880a7a84f6d644bf220199f69da3738f2672cb (diff)
downloadaur-4be9aa6350430703383b9df26be2aa37ce840cdc.tar.gz
aur-4be9aa6350430703383b9df26be2aa37ce840cdc.tar.xz
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>
Diffstat (limited to 'web/template')
-rw-r--r--web/template/pkg_comments.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php
index f973b74d..7d9bedcc 100644
--- a/web/template/pkg_comments.php
+++ b/web/template/pkg_comments.php
@@ -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; ?>