summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/ruby.rb
Commit message (Collapse)AuthorAgeFilesLines
* Ruby scanner: #{...} delimiters are now :inline_delimiter to solve CSS problem.murphy2006-10-181-2/+2
| | | | | | New token: :inline_delimiter Scanner tests suite revamped: colorization, split up into methods.
* Fixed warning in bench.rb.murphy2006-10-181-19/+22
| | | | | | | | | | Ruby Scanner: improved handling of ambiguos values. - operator methods are now :ident instead of :operator - fancy_allowed and regexp_allowed are now value_expected - value_expected works in operator method calls - tests enhanced and adjusted Scanner tests: new diffed option, diff doesn't imply noassert anymore
* Fixed functional test.murphy2006-10-181-1/+1
| | | | | | | Fixed Ruby scanner (/= was scanned as regexp!) Made bench.rb run from any folder. Made scanner test diff function work via EDITOR instead of gvimdiff.
* Ruby scanner: deleted regexp highlighting (didn't work anyway)murphy2006-09-281-40/+0
| | | | | HTML highlighter: unknown token classes now yield a CSS class with that name instead of :error A new Ruby test
* Changed error handling of all scanners: :error tokens are OK now, even in ↵murphy2006-07-111-400/+404
| | | | | | | | | | | | | debug mode, but token kind is nil unless assigned. Small fixes for C and Ruby scanners. Renamed local variable type to kind in Ruby scanner. Improved RHTML scanner to recognize -%> as delimiter. HTML encoder: improved handling of malformed token strings. Fixed PluginHost#inspect including docu. Scanner#raise_inspect also shows state if given.
* Big re-indenting - no more tabs!murphy2006-07-101-16/+16
|
* Fixed another bug in the Ruby scanner, this time it was unfinished heredocs ↵murphy2006-07-091-364/+365
| | | | | | with empty delimiter. Fixed documentation uploading.
* [BUG] Fixed bug in Ruby-Scanner (input ends with unfinished escape in ↵murphy2006-07-091-0/+2
| | | | | | string) (thanks to bovi again.) Test case added.
* Re-indented everything. Sorry to break the blame chain.murphy2006-04-161-2/+5
|
* All scanners revisited not to produce errors unless in DEBUG mode. [thx@Daniel]murphy2006-04-161-2/+4
| | | | | | | Fixed numerization for input not ending with \n. Added test cases in C scanner tests. Added WoNáDo as contributer for last Ruby scanner fix. Updated TODO.
* styles/_map.rb added. :cycnus is now default style. html/css.rb adjusted.murphy2006-04-151-33/+33
| | | | | | | | | | ROADMAP and TODO updated. Ruby scanner: Fixed a bug: Fancy strings don't allow \w delimiters. They _do_ also allow whitespace delimiters, but adding this would cause many scan errors. So I leave this bug unfixed.
* Large update: Scanners for HTML, RHTML and Nitro-XHTML added.murphy2006-04-101-14/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Added HTML scanner!murphy2006-04-041-2/+2
| | | | | | | Added test/html/suite.rb and tolkien.in.html test. Benchmark produces inline line numbers now. Minor changes to Ruby and C scanners. Rakefile: unit tests now in -d mode.
* Ruby Scanner: Capital methods (Kernel#Array etc.) are now highlighted as idents.murphy2006-03-241-2/+2
| | | | | Tests adjusted. highlight.rb updated.
* Ruby scanner errors fixed.murphy2006-03-151-4/+4
| | | | | demo_dump and demo_encoder updated for new YAML version. Fixes in output.rb and numerization.rb
* Plugin System extended:murphy2005-12-101-1/+1
| | | | | | | | | | - helper method - path names are expanded encoders/html.rb, div.rb, span.rb, ruby.rb: - using new methods (fixes problems with rdoc and test tasks): renamed scanners/ruby/helper.rb to patterns.rb encoders/statistic.rb: sorting made deterministic (for unit testing)
* New helper module scheme, step 3murphy2005-11-051-1/+1
|
* scanners/ruby.rb: changed operator handling = fix and speedup.murphy2005-10-291-19/+23
| | | | Test fixtures adjusted.
* scanners/ruby.rb, ruby_helper.rb: Fixes, changes.murphy2005-10-291-11/+52
|
* demo/demo_server.rb: Debug mode.murphy2005-10-221-1/+2
| | | | | tokens.rb: orig_each alias deleted; using super now. scanners/ruby.rb: experimental Regexp/Fancy string recognition for "method /.../" cases.
* scanners/ruby.rb: fixed string inline codemurphy2005-10-161-4/+3
| | | | | encoders/helpers/html_css.rb and html_helper.rb: added :inline token encoders/helpers/html_output.rb: made wrapped_in an attr_accessor; fixed option handling in numerize!
* Two new encoders: debug and xml.murphy2005-10-041-14/+17
| | | | | | | | | | | | | | | | encoder.rb: new token handling encoders/statistic.rb: using new handling ruby_helper.rb: small improvements ruby.rb: - escapes in subtoken - Float detection changed - some multi-char operators are now scanned as one token - def and module definition handling changed bin/coderay: improved, new interface (still in progress) plugin.rb: more expressive load error message
* Demos updated, rewritten, enhanced, tested.murphy2005-10-011-9/+13
| | | | | | | | | | | | | | | | | Some code cleanups. Bugs fixed, scanner and encoder improved: count.rb: marked Streamable html_css.rb: style for inline numbers html.rb: changed options; :line_numbers_offset is now :line_number_start html_output.rb: offset for inline numbers fixed html.rb: token text no longer changed by gsub! while highlighting (this is even faster!) text.rb, plugin.rb: reindented ruby.rb: eleminated multiple assignments for speed tokens.rb: reindented, Tokens#to_s added, #<< returns self Plugin system: bugs fixed, error messages improved.
* New Repository, initial importno author2005-09-261-0/+333