Skip to content

Commit

Permalink
Large update: Scanners for HTML, RHTML and Nitro-XHTML added.
Browse files Browse the repository at this point in the history
CSS style changes/enhancments (mainly the new background color for inline code, affects all Ruby code.)
Demos and tests adjusted.

Plugin: new PluginHost::default method.

Scanner:
- New setup method
- ability to re-use a scanner
- ability to keep the tokens
- minor changes to token caching and string flattening

Encoder: Error if token content is neither String nor Symbol.

HTML encoder:
- more warnings for unclosed tokens
- output now UTF-8

Ruby Scanner:
- bug: symbols before => now do not include =; {:foo=>bar} is valid Ruby code
- try to close all open tokens
- constants now all with specific namespace (for speed, I hope)

Styles: new :entity/en class.

Test suite now gives hinted HTML output.
  • Loading branch information
korny committed Apr 10, 2006
1 parent 132b75e commit 5ee1566
Show file tree
Hide file tree
Showing 41 changed files with 2,252 additions and 741 deletions.
1 change: 1 addition & 0 deletions bench/bench.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def here fn = nil
if $dump_input
@size = CodeRay::Tokens.load(data).text_size
else
raise 'Example file is empty.' if data.empty?
unless @size.zero?
data += data until data.size >= @size
data = data[0, @size]
Expand Down
Loading

0 comments on commit 5ee1566

Please sign in to comment.