Class: Coradoc::Input::Html::Converters::Figure
- Inherits:
-
Base
- Object
- Base
- Coradoc::Input::Html::Converters::Figure
show all
- Defined in:
- lib/coradoc/html/input/converters/figure.rb
Constant Summary
collapse
- INSTANCE =
new
Instance Method Summary
collapse
Methods inherited from Base
#extract_leading_trailing_whitespace, #extract_text_from_content, #node_has_ancestor?, #textnode_after_start_with?, #textnode_before_end_with?, #treat_children_coradoc, #treat_coradoc, #unconstrained_after?, #unconstrained_before?
Instance Method Details
23
24
25
26
27
28
|
# File 'lib/coradoc/html/input/converters/figure.rb', line 23
def (node)
title = node.at('./figcaption')
return '' if title.nil?
treat_children_coradoc(title, {})
end
|
#to_coradoc(node, state = {}) ⇒ Object
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/coradoc/html/input/converters/figure.rb', line 10
def to_coradoc(node, state = {})
id = node['id']
title_content = (node)
content = treat_children_coradoc(node, state)
Coradoc::CoreModel::ExampleBlock.new(
title: (title_content),
children: content,
id: id
)
end
|