Method: Ripdoc#on_default

Defined in:
lib/assert2/ripdoc.rb

#on_default(event, tok, f) ⇒ Object

TODO linefeeds inside %w() and possibly ”

TODO colorize :"" and :"#{}" correctly


224
225
226
227
228
229
230
231
232
233
234
235
236
237
# File 'lib/assert2/ripdoc.rb', line 224

def on_default(event, tok, f)
  return f if @in_no_doc

  if @symbol_begun
    @symbol_begun = false
    f << %Q[#{span(:symbol)}#{CGI.escapeHTML(tok)}</span>]
  elsif tok =~ /^[[:punct:]]+$/
    f << %Q[#{span(:operator)}#{CGI.escapeHTML(tok)}</span>]
  else
    on_kw tok, f, event.to_s.sub(/^on_/, '')
  end

  return f
end