Commit 9c91a94d authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge branch '26522-commit-message-link-line-break' into 'master'

Fixed an issue where the link commit message did not end with a newline

See merge request gitlab-org/gitlab!49086
parents 11edb1a6 8a32e643
---
title: Fixed an issue where the link commit message did not end with a newline
merge_request: 49086
author: Kazuya Kojima
type: fixed
...@@ -36,7 +36,7 @@ module Banzai ...@@ -36,7 +36,7 @@ module Banzai
next if html == content next if html == content
node.replace(html) node.replace("\n\n#{html}")
end end
doc doc
......
...@@ -139,6 +139,12 @@ RSpec.describe Banzai::Filter::CommitTrailersFilter do ...@@ -139,6 +139,12 @@ RSpec.describe Banzai::Filter::CommitTrailersFilter do
end end
context "structure" do context "structure" do
it 'starts with two newlines to separate with actual commit message' do
doc = filter(commit_message_html)
expect(doc.xpath('pre').text).to start_with("\n\n")
end
it 'preserves the commit trailer structure' do it 'preserves the commit trailer structure' do
doc = filter(commit_message_html) doc = filter(commit_message_html)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment