Sha256: 01eb20c5b9d9344ab806d77fa36c9a8cb503deacb4f04d13160b7943d83e69b3
Contents?: true
Size: 960 Bytes
Versions: 2
Compression:
Stored size: 960 Bytes
Contents
# -*- coding: utf-8 -*- # #-- # Copyright (C) 2009-2013 Thomas Leitner <t_leitner@gmx.at> # # This file is part of kramdown which is licensed under the MIT. #++ # require 'kramdown/parser/kramdown/blank_line' require 'kramdown/parser/kramdown/extensions' require 'kramdown/parser/kramdown/eob' module Kramdown module Parser class Kramdown BLOCKQUOTE_START = /^#{OPT_SPACE}> ?/ # Parse the blockquote at the current location. def parse_blockquote start_line_number = @src.current_line_number result = @src.scan(PARAGRAPH_MATCH) while !@src.match?(self.class::LAZY_END) result << @src.scan(PARAGRAPH_MATCH) end result.gsub!(BLOCKQUOTE_START, '') el = new_block_el(:blockquote, nil, nil, :location => start_line_number) @tree.children << el parse_blocks(el, result) true end define_parser(:blockquote, BLOCKQUOTE_START) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
kramdown-1.3.1 | lib/kramdown/parser/kramdown/blockquote.rb |
kramdown-1.3.0 | lib/kramdown/parser/kramdown/blockquote.rb |