From fddda21ea2b2a53b661503a0a0bd4493c1564f24 Mon Sep 17 00:00:00 2001 From: RedCocoon Date: Thu, 31 Oct 2024 00:08:47 +0800 Subject: [PATCH] Fix comment form orphan tag issue with lint --- templates/repo/conversation/comment_form.tmpl | 29 +++---------------- .../conversation/comment_form_content.tmpl | 24 +++++++++++++++ 2 files changed, 28 insertions(+), 25 deletions(-) create mode 100644 templates/repo/conversation/comment_form_content.tmpl diff --git a/templates/repo/conversation/comment_form.tmpl b/templates/repo/conversation/comment_form.tmpl index cc5e42a124b..0e8e3efb91b 100644 --- a/templates/repo/conversation/comment_form.tmpl +++ b/templates/repo/conversation/comment_form.tmpl @@ -11,34 +11,13 @@
{{if .IsIssue}}
+ {{template "repo/conversation/comment_form_content" .}} +
{{else}}
+ {{template "repo/conversation/comment_form_content" .}} +
{{end}} - {{template "repo/conversation/comment_tab" .}} - {{.CsrfTokenHtml}} - -
diff --git a/templates/repo/conversation/comment_form_content.tmpl b/templates/repo/conversation/comment_form_content.tmpl new file mode 100644 index 00000000000..186a2d6a966 --- /dev/null +++ b/templates/repo/conversation/comment_form_content.tmpl @@ -0,0 +1,24 @@ +{{template "repo/conversation/comment_tab" .}} +{{.CsrfTokenHtml}} + \ No newline at end of file