mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-05 16:37:19 -04:00
fix issue where lists that didn't start at 1 were not respected (#116)
This commit is contained in:
+2
-1
@@ -7,12 +7,13 @@ import (
|
||||
|
||||
// An ItemElement is used to render items inside a list.
|
||||
type ItemElement struct {
|
||||
IsOrdered bool
|
||||
Enumeration uint
|
||||
}
|
||||
|
||||
func (e *ItemElement) Render(w io.Writer, ctx RenderContext) error {
|
||||
var el *BaseElement
|
||||
if e.Enumeration > 0 {
|
||||
if e.IsOrdered {
|
||||
el = &BaseElement{
|
||||
Style: ctx.options.Styles.Enumeration,
|
||||
Prefix: strconv.FormatInt(int64(e.Enumeration), 10),
|
||||
|
||||
Reference in New Issue
Block a user