Class: CodeRay::Scanners::HTML

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

Overview

HTML Scanner

Direct Known Subclasses

XML

Constant Summary collapse

ATTR_NAME =
/[\w.:-]+/
ATTR_VALUE_UNQUOTED =
ATTR_NAME
TAG_END =
/\/?>/
HEX =
/[0-9a-fA-F]/
ENTITY =
/
  &
  (?:
    \w+
  |
    \#
    (?:
      \d+
    |
      x#{HEX}+
    )
  )
  ;
/ox
PLAIN_STRING_CONTENT =
{
  "'" => /[^&'>\n]+/,
  '"' => /[^&">\n]+/,
}

Constants inherited from Scanner

Scanner::DEFAULT_OPTIONS, Scanner::ScanError

Instance Method Summary collapse

Methods inherited from Scanner

#column, #each, file_extension, #initialize, #line, normify, 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

Instance Method Details

#resetObject



34
35
36
37
# File 'lib/coderay/scanners/html.rb', line 34

def reset
  super
  @state = :initial
end