Class: Paru::PandocFilter::BulletList

Inherits:
List show all
Defined in:
lib/paru/filter/bullet_list.rb

Overview

BulletList, contains a list of list of Block nodes.

Class Method Summary collapse

Constructor Details

This class inherits a constructor from Paru::PandocFilter::List

Class Method Details

.from_array(items) ⇒ BulletList

Create a new BulletList from an array of markdown strings

Parameters:

  • items (String[])

    array of markdown strings as items of the new BulletList

Returns:



31
32
33
34
# File 'lib/paru/filter/bullet_list.rb', line 31

def self.from_array(items)
    ast_items = items.map {|item| [Block.from_markdown(item).to_ast]}
    BulletList.new ast_items
end