loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request 'fix: remove softbreak from github legacy callout' (#6152) from gusted/forgejo-callout into forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6152
Reviewed-by: Otto <otto@codeberg.org>

Otto ab00d875 8208c9b2

+14
+8
modules/markup/markdown/callout/github_legacy.go
··· 65 65 attentionParagraph.AppendChild(attentionParagraph, calloutNode) 66 66 firstParagraph.Parent().InsertBefore(firstParagraph.Parent(), firstParagraph, attentionParagraph) 67 67 firstParagraph.RemoveChild(firstParagraph, calloutNode) 68 + 69 + // Remove softbreak line if there's one. 70 + if firstParagraph.ChildCount() >= 1 { 71 + softBreakNode, ok := firstParagraph.FirstChild().(*ast.Text) 72 + if ok && softBreakNode.SoftLineBreak() { 73 + firstParagraph.RemoveChild(firstParagraph, softBreakNode) 74 + } 75 + } 68 76 } 69 77 70 78 return ast.WalkContinue, nil
+6
modules/markup/markdown/markdown_test.go
··· 1356 1356 } 1357 1357 1358 1358 test(">\n0", "<blockquote>\n</blockquote>\n<p>0</p>") 1359 + 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> 1360 + <p>Bad stuff is brewing here</p> 1361 + </blockquote>`) 1362 + 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> 1363 + <p>Bad stuff is brewing here</p> 1364 + </blockquote>`) 1359 1365 }