/usr/lib/ruby/vendor_ruby/kramdown/parser/kramdown/block_boundary.rb is in ruby-kramdown 1.15.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | # -*- coding: utf-8 -*-
#
#--
# Copyright (C) 2009-2016 Thomas Leitner <t_leitner@gmx.at>
#
# This file is part of kramdown which is licensed under the MIT.
#++
#
require 'kramdown/parser/kramdown/extensions'
require 'kramdown/parser/kramdown/blank_line'
require 'kramdown/parser/kramdown/eob'
module Kramdown
module Parser
class Kramdown
BLOCK_BOUNDARY = /#{BLANK_LINE}|#{EOB_MARKER}|#{IAL_BLOCK_START}|\Z/
# Return +true+ if we are after a block boundary.
def after_block_boundary?
!@tree.children.last || @tree.children.last.type == :blank ||
(@tree.children.last.type == :eob && @tree.children.last.value.nil?) || @block_ial
end
# Return +true+ if we are before a block boundary.
def before_block_boundary?
@src.check(self.class::BLOCK_BOUNDARY)
end
end
end
end
|