Class: Markdownlyze::Elements::Quote
- Defined in:
- lib/markdownlyze/elements/quote.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Markdownlyze::Elements::Base
Instance Method Details
#value ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/markdownlyze/elements/quote.rb', line 4 def value @lines[@index..-1].each_with_index do |subline, subindex| if !subline.match?(/^\> .*/) && subline.to_s.strip != '>' @skip_until = @index + subindex break end end @skip_until = @lines.size if @skip_until.nil? @lines[@index..(@skip_until - 1)].map { |line| to_html(line.gsub(/^\> /, '')) } end |