Sha256: 2d2439a405c40fd3145e98c96e41266b041d3f4b91e3f96bf18702b01eefb083

Contents?: true

Size: 556 Bytes

Versions: 2

Compression:

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

      ESCAPED_CHARS = /\\([\\.*_+`<>()\[\]{}#!:|"'$=-])/

      # Parse the backslash-escaped character at the current location.
      def parse_escaped_chars
        @src.pos += @src.matched_size
        add_text(@src[1])
      end
      define_parser(:escaped_chars, ESCAPED_CHARS, '\\\\')

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kramdown-2.5.1 lib/kramdown/parser/kramdown/escaped_chars.rb
kramdown-2.5.0 lib/kramdown/parser/kramdown/escaped_chars.rb