Class: Coradoc::Markdown::OpenBlock
- Defined in:
- lib/coradoc/markdown/model/open_block.rb
Overview
Open block — generic container that groups content without semantic formatting. Used in AsciiDoc to apply IDs/attributes to a group.
Markdown has no native container. The serializer’s OpenBlock strategy:
- Without id/classes → emit children as siblings (no wrapper)
- With id/classes → emit `<div id="...">...</div>` wrapper
Instance Method Summary collapse
-
#initialize(children: [], **rest) ⇒ OpenBlock
constructor
A new instance of OpenBlock.
Methods inherited from Base
Constructor Details
#initialize(children: [], **rest) ⇒ OpenBlock
Returns a new instance of OpenBlock.
16 17 18 19 |
# File 'lib/coradoc/markdown/model/open_block.rb', line 16 def initialize(children: [], **rest) super @children = Array(children) end |