Sha256: a1154836c11094793aade57810a5faf0eb129c231ab4b5bd13bb4c30ef1a936e

Contents?: true

Size: 666 Bytes

Versions: 7

Compression:

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

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 @tree.children.last && @tree.children.last.type == :blank
          @tree.children.last.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

7 entries across 7 versions & 1 rubygems

Version Path
kramdown-1.3.1 lib/kramdown/parser/kramdown/blank_line.rb
kramdown-1.3.0 lib/kramdown/parser/kramdown/blank_line.rb
kramdown-1.2.0 lib/kramdown/parser/kramdown/blank_line.rb
kramdown-1.1.0 lib/kramdown/parser/kramdown/blank_line.rb
kramdown-1.0.2 lib/kramdown/parser/kramdown/blank_line.rb
kramdown-1.0.1 lib/kramdown/parser/kramdown/blank_line.rb
kramdown-1.0.0 lib/kramdown/parser/kramdown/blank_line.rb