[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
This commit is contained in:
Gusted 2024-04-03 21:52:30 +02:00
parent c360b630e3
commit 6ffae461d4
No known key found for this signature in database
GPG key ID: FD821B732837125F
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)