Sha256: 6b5ffb45b787a54b4b53825a9b28d34e9fe1d43e08c03d3db746644d40ea38b5
Contents?: true
Size: 886 Bytes
Versions: 14
Compression:
Stored size: 886 Bytes
Contents
# -*- coding: utf-8; frozen_string_literal: true -*- # #-- # Copyright (C) 2009-2019 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? last_child = @tree.children.last !last_child || last_child.type == :blank || (last_child.type == :eob && last_child.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
Version data entries
14 entries across 14 versions & 4 rubygems