Refactor the GitHub Legacy callout renderer too

Following up on the previous commit, change the GitHub Legacy callout
renderer to render the same as the refactored modern renderer.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
This commit is contained in:
Gergely Nagy 2024-03-23 15:29:46 +01:00
parent ec2201a3da
commit 58d4af8fdb
No known key found for this signature in database

View file

@ -49,7 +49,7 @@ func (g *GitHubLegacyCalloutTransformer) Transform(node *ast.Document, reader te
calloutNode.SetAttributeString("class", []byte("attention-"+calloutType))
// color the blockquote
v.SetAttributeString("class", []byte("gt-py-3 attention attention-"+calloutType))
v.SetAttributeString("class", []byte("attention-header attention-"+calloutType))
// Prepend callout icon before the callout node itself
firstParagraph.InsertBefore(firstParagraph, calloutNode, NewAttention(calloutType))