Class: Shoes::Highlighter::Syntax::Default

Inherits:
Object
  • Object
show all
Defined in:
lib/shoes/highlighter/common.rb

Overview

A default tokenizer for handling syntaxes that are not explicitly handled elsewhere. It simply yields the given text as a single token.

Instance Method Summary collapse

Instance Method Details

#tokenize(text) {|Token.new(text, :normal)| ... } ⇒ Object

Yield the given text as a single token.

Yields:

  • (Token.new(text, :normal))


164
165
166
# File 'lib/shoes/highlighter/common.rb', line 164

def tokenize(text)
  yield Token.new(text, :normal)
end