Class: CodeRay::Scanners::NitroXHTML

Inherits:
Scanner
  • Object
show all
Includes:
CodeRay::Streamable
Defined in:
lib/coderay/scanners/nitro_xhtml.rb

Overview

Nitro XHTML Scanner

Constant Summary collapse

KINDS_NOT_LOC =
HTML::KINDS_NOT_LOC
NITRO_RUBY_BLOCK =
/
  <\?r
  (?>
    [^\?]*
    (?> \?(?!>) [^\?]* )*
  )
  (?: \?> )?
|
  <ruby>
  (?>
    [^<]*
    (?> <(?!\/ruby>) [^<]* )*
  )
  (?: <\/ruby> )?
|
  <%
  (?>
    [^%]*
    (?> %(?!>) [^%]* )*
  )
  (?: %> )?
/mx
NITRO_VALUE_BLOCK =
/
  \#
  (?:
    \{
    [^{}]*
    (?>
      \{ [^}]* \}
      (?> [^{}]* )
    )*
    \}?
  | \| [^|]* \|?
  | \( [^)]* \)?
  | \[ [^\]]* \]?
  | \\ [^\\]* \\?
  )
/x
NITRO_ENTITY =
/
  % (?: \#\d+ | \w+ ) ;
/
START_OF_RUBY =
/
  (?=[<\#%])
  < (?: \?r | % | ruby> )
| \# [{(|]
| % (?: \#\d+ | \w+ ) ;
/x
CLOSING_PAREN =
Hash.new do |h, p|
  h[p] = p
end.update( {
  '(' => ')',
  '[' => ']',
  '{' => '}',
} )

Constants inherited from Scanner

Scanner::DEFAULT_OPTIONS, Scanner::ScanError

Method Summary

Methods inherited from Scanner

#column, #each, file_extension, #initialize, #line, #marshal_dump, #marshal_load, normify, #reset, streamable?, #streaming?, #string=, #tokenize, #tokens

Methods included from Plugin

#helper, #included, #plugin_host, #plugin_id, #register_for, #title

Constructor Details

This class inherits a constructor from CodeRay::Scanners::Scanner