lib/kramdown/parser/kramdown/blockquote.rb in kramdown-1.17.0 vs lib/kramdown/parser/kramdown/blockquote.rb in kramdown-2.0.0.beta1
- old
+ new
@@ -1,9 +1,9 @@
-# -*- coding: utf-8 -*-
+# -*- coding: utf-8; frozen_string_literal: true -*-
#
#--
-# Copyright (C) 2009-2016 Thomas Leitner <t_leitner@gmx.at>
+# Copyright (C) 2009-2019 Thomas Leitner <t_leitner@gmx.at>
#
# This file is part of kramdown which is licensed under the MIT.
#++
#
@@ -19,21 +19,20 @@
# 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)
+ until @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)
+ 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