Class: Coradoc::Markdown::Verse

Inherits:
Base
  • Object
show all
Defined in:
lib/coradoc/markdown/model/verse.rb

Overview

Verse block — preformatted text preserving line breaks but allowing inline formatting. Distinct from a literal block (no formatting) or a code block (no formatting + language hint).

Markdown has no native verse. Serialized as a blockquote with the understanding that verse semantics are lost but line breaks are preserved via hard line breaks.

Instance Method Summary collapse

Methods inherited from Base

visit, #visit

Constructor Details

#initialize(content:, attribution: nil, citetitle: nil, **rest) ⇒ Verse

Returns a new instance of Verse.



19
20
21
22
23
24
# File 'lib/coradoc/markdown/model/verse.rb', line 19

def initialize(content:, attribution: nil, citetitle: nil, **rest)
  super
  @content = content
  @attribution = attribution
  @citetitle = citetitle
end