From 5f989becaf919d25568e74587eaecb9603ceb2cd Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Oct 02 2018 07:57:04 +0000 Subject: [PATCH 1/2] Fix citing the original comment in a ticket Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/templates/_formhelper.html b/pagure/templates/_formhelper.html index 50b7897..ea8e4a7 100644 --- a/pagure/templates/_formhelper.html +++ b/pagure/templates/_formhelper.html @@ -306,10 +306,10 @@ {% macro show_initial_comment(comment, username, repo, issueid, form) %} -
+
-{{ comment.content | markdown | noJS | safe }} +{{- comment.content | markdown | noJS | safe -}}
diff --git a/pagure/templates/issue.html b/pagure/templates/issue.html index c71ab80..ce5db3a 100644 --- a/pagure/templates/issue.html +++ b/pagure/templates/issue.html @@ -769,6 +769,9 @@ function setup_reply_btns() { $( ".reply" ).click( function() { var _section = $(this).closest('.card'); + if (!_section.length) { + var _section = $(this).closest('#original_comment_box'); + } var _comment = _section.find('.comment_body'); var _text = _comment.text().split("\n"); var _output = new Array(); From 121bdb9f7f30759939e9d0ab1b447281a3ba765d Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Oct 02 2018 07:57:04 +0000 Subject: [PATCH 2/2] Trim end of lines in template Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/templates/_formhelper.html b/pagure/templates/_formhelper.html index ea8e4a7..671eed8 100644 --- a/pagure/templates/_formhelper.html +++ b/pagure/templates/_formhelper.html @@ -121,7 +121,7 @@ - {{ comment.user.user }} + {{ comment.user.user }} @@ -156,7 +156,7 @@
{% endif %} {% endif%} - + {% if g.fas_user %} - {{ pull_request.user.user }} + {{ pull_request.user.user }} @@ -257,7 +257,7 @@ {% endif %} {% if g.fas_user and (g.repo_committer or g.fas_user.username == pull_request.user.username) %} -