mirror of
https://github.com/danog/blackfriday.git
synced 2024-11-26 20:14:43 +01:00
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.
This commit is contained in:
parent
771cf410c8
commit
efa77da18b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user