Sha256: 2975515e7e375f14bd94b3422da6e648b184605205fc3d27d719824db1377151

Contents?: true

Size: 692 Bytes

Versions: 14

Compression:

Stored size: 692 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.
#++
#

module Kramdown
  module Parser
    class Kramdown

      BLANK_LINE = /(?>^\s*\n)+/

      # Parse the blank line at the current postition.
      def parse_blank_line
        @src.pos += @src.matched_size
        if (last_child = @tree.children.last) && last_child.type == :blank
          last_child.value << @src.matched
        else
          @tree.children << new_block_el(:blank, @src.matched)
        end
        true
      end
      define_parser(:blank_line, BLANK_LINE)

    end
  end
end

Version data entries

14 entries across 14 versions & 4 rubygems

Version Path
kramdown-2.5.1 lib/kramdown/parser/kramdown/blank_line.rb
kramdown-2.5.0 lib/kramdown/parser/kramdown/blank_line.rb
getargv-0.3.3-universal-darwin vendor/bundle/ruby/3.3.0/gems/kramdown-2.4.0/lib/kramdown/parser/kramdown/blank_line.rb
kramdown-2.4.0 lib/kramdown/parser/kramdown/blank_line.rb
kramdown-2.3.2 lib/kramdown/parser/kramdown/blank_line.rb
kramdown-2.3.1 lib/kramdown/parser/kramdown/blank_line.rb
daqing_kramdown-2.3.2 lib/kramdown/parser/kramdown/blank_line.rb
daqing_kramdown-2.3.1 lib/kramdown/parser/kramdown/blank_line.rb
zine_brewer-1.5.0 vendor/bundle/ruby/2.7.0/gems/kramdown-2.3.0/lib/kramdown/parser/kramdown/blank_line.rb
zine_brewer-1.3.0 vendor/bundle/ruby/2.7.0/gems/kramdown-2.3.0/lib/kramdown/parser/kramdown/blank_line.rb
kramdown-2.3.0 lib/kramdown/parser/kramdown/blank_line.rb
kramdown-2.2.1 lib/kramdown/parser/kramdown/blank_line.rb
kramdown-2.2.0 lib/kramdown/parser/kramdown/blank_line.rb
kramdown-2.1.0 lib/kramdown/parser/kramdown/blank_line.rb