Sha256: fe0f1fde508d06e1fe7225881dc626b48afb7e951d2cec45937dbb9b99d03d0b
Contents?: true
Size: 634 Bytes
Versions: 20
Compression:
Stored size: 634 Bytes
Contents
## # A section of verbatim text class RDoc::Markup::Verbatim < RDoc::Markup::Raw ## # Calls #accept_verbatim on +visitor+ def accept visitor visitor.accept_verbatim self end ## # Collapses 3+ newlines into two newlines def normalize parts = [] newlines = 0 @parts.each do |part| case part when /^\s*\n/ then newlines += 1 parts << part if newlines == 1 else newlines = 0 parts << part end end parts.pop if parts.last =~ /\A\r?\n\z/ @parts = parts end ## # The text of the section def text @parts.join end end
Version data entries
20 entries across 20 versions & 1 rubygems