1
0
Fork 0
forked from forgejo/forgejo

[BUG] Center icon and callout text

- Wrap the icon and callout into a seperate `<p>` which has `display:
flex; align-items: center` set. To center the icon with the callout text.
- Resolves #3006

(cherry picked from commit 6ffae461d4)
This commit is contained in:
Gusted 2024-04-03 21:52:30 +02:00 committed by GitHub
parent bc873f2e83
commit 06e72e22d5
4 changed files with 16 additions and 2 deletions

View file

@ -72,6 +72,7 @@ func (g *GitHubCalloutTransformer) Transform(node *ast.Document, reader text.Rea
// create an emphasis to make it bold
attentionParagraph := ast.NewParagraph()
attentionParagraph.SetAttributeString("class", []byte("attention-title"))
emphasis := ast.NewEmphasis(2)
emphasis.SetAttributeString("class", []byte("attention-"+attentionType))
firstParagraph.InsertBefore(firstParagraph, firstTextNode, emphasis)