mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-11 04:05:10 +02:00
fix: remove softbreak from github legacy callout
- A softbreak was being preserved during the github legacy callout (this is likely due to a change in Goldmark) while it should not. This caused an `<br>` to be present between the attention title and attention content. - Added unit test.
This commit is contained in:
parent
790f3c4861
commit
216a542bfb
2 changed files with 14 additions and 0 deletions
|
@ -1356,4 +1356,10 @@ func TestCallout(t *testing.T) {
|
|||
}
|
||||
|
||||
test(">\n0", "<blockquote>\n</blockquote>\n<p>0</p>")
|
||||
test("> **Warning**\n> Bad stuff is brewing here", `<blockquote class="attention-header attention-warning"><p class="attention-title"><strong class="attention-warning">Warning</strong></p>
|
||||
<p>Bad stuff is brewing here</p>
|
||||
</blockquote>`)
|
||||
test("> [!WARNING]\n> Bad stuff is brewing here", `<blockquote class="attention-header attention-warning"><p class="attention-title"><strong class="attention-warning">Warning</strong></p>
|
||||
<p>Bad stuff is brewing here</p>
|
||||
</blockquote>`)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue