Class: Coradoc::Input::HTML::Converters::Blockquote
- Defined in:
- lib/coradoc/input/html/converters/blockquote.rb
Instance Method Summary collapse
Methods inherited from Base
#convert, #extract_leading_trailing_whitespace, #extract_title, #node_has_ancestor?, #textnode_after_start_with?, #textnode_before_end_with?, #treat, #treat_children, #treat_children_coradoc, #treat_coradoc, #unconstrained_after?, #unconstrained_before?
Instance Method Details
#to_coradoc(node, state = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/coradoc/input/html/converters/blockquote.rb', line 4 def to_coradoc(node, state = {}) node["id"] cite = node["cite"] attributes = Coradoc::Element::AttributeList.new attributes.add_positional("quote", cite) if !cite.nil? content = treat_children(node, state).strip content = Coradoc::Input::HTML.cleaner.remove_newlines(content) Coradoc::Element::Block::Quote.new(nil, lines: content, attributes: attributes) end |