Module: Lydown::Parsing::Lyrics::QuotedContent

Defined in:
lib/lydown/parsing/nodes.rb

Instance Method Summary collapse

Instance Method Details

#to_stream(o, opts) ⇒ Object



318
319
320
321
322
323
324
325
326
327
328
329
330
# File 'lib/lydown/parsing/nodes.rb', line 318

def to_stream(o, opts)
  if text_value =~ /^"(.+)"$/
    content = $1
  else
    raise LydownError, "Unexpected quoted lyrics content (#{text_value.inspect})"
  end

  if o[:content]
    o[:content] << ' ' << content
  else
    o[:content] = content
  end
end