mdc/lib/rendering/renderer.rb
##
# Split the line into tokens. One token for each code / non-code fragment
# is created
# @param [String] input the input
# @param [Pattern] expression regex used for tokenizing
# @return [Renderer::LinePart[]] the input tokenized
Split the line into tokens. One token for each code / non-code fragment
is created
Split the line into tokens . One token for each code / non - code fragment is created
def tokenize_line(input, expression)
      parts = []
      remainder = input
      while expression =~ remainder
        parts << LinePart.new($`, false)
        parts << LinePart.new(Regexp.last_match(1), true)
        remainder = $'
      end
      parts << LinePart.new(remainder, false)
      parts
    end
def tokenize_line ( input , expression ) parts = [ ] remainder = input while expression =~ remainder parts << LinePart . new ( $` , false ) parts << LinePart . new ( Regexp . last_match ( 1 ) , true ) remainder = $' end parts << LinePart . new ( remainder , false ) parts end
Split the line into tokens.
Split the line into tokens .
] the input tokenized
] the input tokenized
Renderer::LinePart[
input
<not_specific>
expression
<not_specific>
<not_specific>
expression regex used for tokenizing
expression regex used for tokenizing