# File lib/maruku/input/parse_span.rb, line 521
  def read_inline_code(src, con)
    # Count the number of ticks
    num_ticks = 0
    while src.cur_char == '`'
      num_ticks += 1
      src.ignore_char
    end
    # We will read until this string
    end_string = "`" * num_ticks

    # Try to handle empty single-ticks
    if num_ticks > 1 && !src.next_matches(/.*#{Regexp.escape(end_string)}/)
      con.push_element md_entity('ldquo')
      src.ignore_chars(2)
      return
    end

    code = read_simple(src, nil, nil, end_string)

    # We didn't find a closing batch!
    if !code || src.cur_char != '`'
      con.push_element(end_string + (code || '')) and return
    end

    #   puts "Now I expects #{num_ticks} ticks: #{src.cur_chars(10).inspect}"
    src.ignore_chars num_ticks

    # Ignore at most one space
    if num_ticks > 1 && code[0, 1] == ' '
      code = code[1..-1]
    end

    # drop last space
    if num_ticks > 1 && code[-1, 1] == ' '
      code = code[0..-2]
    end

    #   puts "Read `` code: #{code.inspect}; after: #{src.cur_chars(10).inspect} "
    con.push_element md_code(code)
  end