lib/pdf/reader/buffer.rb
# tokenising behaves slightly differently based on the current context.
# Determine the current context/state by examining the last token we found
#
tokenising behaves slightly differently based on the current context.
Determine the current context/state by examining the last token we found
tokenising behaves slightly differently based on the current context . Determine the current context / state by examining the last token we found
def state
      case @tokens.last
      when LEFT_PAREN then :literal_string
      when LESS_THAN then :hex_string
      when STREAM then :stream
      when ID
        if in_content_stream?  && @tokens[-2] != FWD_SLASH
          :inline
        else
          :regular
        end
      else
        :regular
      end
    end
def state case @tokens . last when LEFT_PAREN then :literal_string when LESS_THAN then :hex_string when STREAM then :stream when ID if in_content_stream? && @tokens [ - 2 ] != FWD_SLASH :inline else :regular end else :regular end end
tokenising behaves slightly differently based on the current context.
tokenising behaves slightly differently based on the current context .