From efa77da18b0fa3413ebafb99ef6afad578ad6593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vytautas=20=C5=A0altenis?= Date: Sun, 28 Aug 2016 23:00:27 +0300 Subject: [PATCH] Fix omission in list item flags When parseRefsToAST constructs a list of footnotes, it hardcoded the item flags to ListTypeOrdered and omitted ListItemBeginningOfList. However, a quick look around indicates that ListItemBeginningOfList might have lost its meaning altogether in v2 (it used to control item spacing in v1, which is now extracted from the AST structure). So add a TODO to clean that up one day. --- markdown.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/markdown.go b/markdown.go index 4a156a0..0bf1c12 100644 --- a/markdown.go +++ b/markdown.go @@ -82,7 +82,7 @@ const ( ListTypeTerm ListItemContainsBlock - ListItemBeginningOfList + ListItemBeginningOfList // TODO: figure out if this is of any use now ListItemEndOfList ) @@ -428,7 +428,7 @@ func (p *parser) parseRefsToAST() { for i := 0; i < len(p.notes); i++ { ref := p.notes[i] block := p.addBlock(Item, nil) - block.ListFlags = ListTypeOrdered + block.ListFlags = flags | ListTypeOrdered block.RefLink = ref.link if ref.hasBlock { flags |= ListItemContainsBlock