mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-06 08:57:14 -04:00
Remove redundant Text member from ItemElement
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type ItemElement struct {
|
type ItemElement struct {
|
||||||
Text string
|
|
||||||
Enumeration uint
|
Enumeration uint
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -14,13 +13,11 @@ func (e *ItemElement) Render(w io.Writer, ctx RenderContext) error {
|
|||||||
var el *BaseElement
|
var el *BaseElement
|
||||||
if e.Enumeration > 0 {
|
if e.Enumeration > 0 {
|
||||||
el = &BaseElement{
|
el = &BaseElement{
|
||||||
Token: e.Text,
|
|
||||||
Style: ctx.style[Enumeration],
|
Style: ctx.style[Enumeration],
|
||||||
Prefix: strconv.FormatInt(int64(e.Enumeration), 10),
|
Prefix: strconv.FormatInt(int64(e.Enumeration), 10),
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
el = &BaseElement{
|
el = &BaseElement{
|
||||||
Token: e.Text,
|
|
||||||
Style: ctx.style[Item],
|
Style: ctx.style[Item],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user