Class: Sablon::HTMLConverter::ListParagraph

Inherits:
Paragraph show all
Defined in:
lib/sablon/html/ast.rb

Overview

Sets list item specific attributes registered on the node to properly generate a list paragraph

Constant Summary

Constants inherited from Paragraph

Paragraph::CHILD_TAGS, Paragraph::PROPERTIES

Constants inherited from Node

Node::PROPERTIES

Instance Attribute Summary

Attributes inherited from Paragraph

#runs

Instance Method Summary collapse

Methods inherited from Paragraph

#accept, #inspect, #to_docx

Methods inherited from Node

#accept, convert_style_property, node_name, process_properties, style_conversion, #to_docx

Constructor Details

#initialize(env, node, properties) ⇒ ListParagraph

Returns a new instance of ListParagraph.



273
274
275
276
277
278
279
280
# File 'lib/sablon/html/ast.rb', line 273

def initialize(env, node, properties)
  list_props = {
    pStyle: node['pStyle'],
    numPr: [{ ilvl: node['ilvl'] }, { numId: node['numId'] }]
  }
  properties = properties.merge(list_props)
  super
end