mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-06 00:47:15 -04:00
Decode style JSON into a typed struct
This commit is contained in:
@@ -19,7 +19,7 @@ func (e *LinkElement) Render(w io.Writer, ctx RenderContext) error {
|
||||
|
||||
el := &BaseElement{
|
||||
Token: e.Text,
|
||||
Style: ctx.style[LinkText],
|
||||
Style: ctx.styles.LinkText,
|
||||
}
|
||||
err := el.Render(w, ctx)
|
||||
if err != nil {
|
||||
@@ -53,7 +53,7 @@ func (e *LinkElement) Render(w io.Writer, ctx RenderContext) error {
|
||||
|
||||
if len(e.URL) > 0 {
|
||||
pre := " "
|
||||
style := ctx.style[Link]
|
||||
style := ctx.styles.Link
|
||||
if !textRendered {
|
||||
pre = ""
|
||||
style.Prefix = ""
|
||||
|
||||
Reference in New Issue
Block a user