You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
558 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

'use strict'
module.exports = unorderedItems
var lineFeed = '\n'
var blank = lineFeed + lineFeed
// Visit unordered list items. Uses `options.bullet` as each items bullet.
function unorderedItems(node) {
var self = this
var bullet = self.options.bullet
var fn = self.visitors.listItem
var children = node.children
var length = children.length
var index = -1
var values = []
while (++index < length) {
values[index] = fn.call(self, children[index], node, index, bullet)
}
return values.join(node.spread ? blank : lineFeed)
}