Commit 8a32e643 authored by kkoji's avatar kkoji Committed by Lin Jen-Shin

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

parent 960b6409
---
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