Sha256: 0ee0ca74b3494109f4de4cb221532acea03c2cced77a16c63e95d10703ec4430

Contents?: true

Size: 645 Bytes

Versions: 2

Compression:

Stored size: 645 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

      HR_START = /^#{OPT_SPACE}(\*|-|_)[ \t]*\1[ \t]*\1(\1|[ \t])*\n/

      # Parse the horizontal rule at the current location.
      def parse_horizontal_rule
        start_line_number = @src.current_line_number
        @src.pos += @src.matched_size
        @tree.children << new_block_el(:hr, nil, nil, :location => start_line_number)
        true
      end
      define_parser(:horizontal_rule, HR_START)

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kramdown-1.3.1 lib/kramdown/parser/kramdown/horizontal_rule.rb
kramdown-1.3.0 lib/kramdown/parser/kramdown/horizontal_rule.rb