summaryrefslogtreecommitdiff
path: root/lib/coderay
Commit message (Collapse)AuthorAgeFilesLines
...
* Updated cYcnus style (grayscale colors).murphy2009-01-131-5/+5
|
* Plugin.helper can be used to load helpers from other plugins using the ↵murphy2009-01-131-1/+9
| | | | 'plugin/helper' syntax.
* New: *Groovy Scanner* (feature #60)murphy2009-01-132-0/+249
| | | | | | | | | | | * It inherits from Java Scanner, re-using some constants. * Thanks to Stefan Weinmann for helping me with Groovy. * PLEAC code used for testing. * Some issues with remain with strings and regexps. * Rating: 2 / 5 stars, "Basic support" * Added .groovy and .gvy to FileType. * CodeRay now supports a language that pygments doesn't support ;-)
* Java Scanner: remove :regexp cases, use :pre_type for built-in types.murphy2009-01-131-10/+3
|
* Ruby Scanner: Shebang comments are highlighted as :doctype.murphy2009-01-131-0/+4
|
* Fixed a bug in Ruby scanner that broke tests with JRuby.murphy2009-01-111-1/+2
|
* Fixed documentation, moved README into lib folder.murphy2009-01-051-1/+1
|
* Added js alias for JavaScript.murphy2009-01-041-0/+1
|
* Made plugin ids case-insensitive.murphy2009-01-011-1/+1
| | | | | With this change, upper case lang names are allowed like 'C'.
* Completed YAML Scanner (closes #34).murphy2009-01-015-28/+38
| | | | | | | | | | | | | YAML Scanner: * Added another example (multiline). * Added multiline string recognition. * This should be enough for most people. Else: * New method: Scanner#column (very useful and fast!) * Added new token type :doctype, used also by HTML scanner. * coderay_suite: minor output tweaks.
* JRuby fixes.murphy2008-12-251-2/+3
|
* Fixes for Ruby 1.9.murphy2008-12-253-54/+60
|
* Improved YAML Scanner (ticket #34).murphy2008-11-072-11/+35
| | | | | | * Added more YAML example files (website, database). * Minor code cleanup in Scanner.
* Fixed tests and YAML Scanner (#34)murphy2008-10-201-1/+1
| | | | | * The last commit (r262) also belongs to ticket #34.
* New: *YAML* (#53). Preparing for version 0.8.1.murphy2008-10-207-9/+126
| | | | | | | | | | | | | | * Based on the YAML scanner from Jamis Buck's Syntax lib. * Some YAML examples from Ruby gems. * Doesn't handle string yet; alpha state. More changes: * coderay_suite: new parameter "fast" makes testing faster (for development). * Changed the title of HTML page output (Page Encoder). * FileType: Added new file types. * cYcnus style: simplified some token group styles. * Cleanup in CSS and HTML Scanners.
* New: *JSON* (closes #53). Version 0.8 is near!murphy2008-10-082-5/+114
| | | | | | | | | | | | * Simple and really nice scanner (I think), produces colorful output. * Checked against strange examples from Ruby's JSON lib. More changes: * Changed version number. Finally! * Added some token styles for :key token group. * cYcnus style: chars inside of strings are highlighted purple instead of blue. * murphy style needs work.
* New: *Simple Diff Scanner* (closes #22).murphy2008-09-3010-14/+188
| | | | | | | | | | | | | | * Highlights unified diffs, especially like the ones svn diff outputs. * Changes to make highlighting of whole lines were necessary. * I added two example files. More changes: * Added token classes :head, :delete, :insert, and :change along with styles. * Added two new special token types: :begin_line and :end_line. They mark token groups that explicitly span whole lines and should be highlighted as such. * The HTML encoder converts these new tokens to DIVs. May need more work. * The Debug Encoder uses square brackets for line tokens. * Some cleanups.
* Optimized CSS styles, improved coderay_suite, new HTML test.murphy2008-09-241-1/+1
| | | | | | | * CSS styles are shortened more to optimize HTML output. * Added a longer example file for the HTML Scanner. * coderay_suite prints more accurate and sensible benchmarks.
* New: *Java Scanner* (closes #42).murphy2008-09-217-20/+620
| | | | | | | | | | | | | | | | | | | * Based on JavaScript, does a good job, but may need more polish. * Java::BuiltinTypes::List is a helper constant that contains 2389 Java types. ** The list was generated from TextMate's Java bundle with the help of SimpleRegexpScanner. * I added the JRuby core classes as example code for testing (1.8 MB) JavaScript Scanner: * Fixed recognition of floats and algebraic signs. ** Still needs work - we need to distinguish i-1 from i+-1. More changes: * New: "SimpleRegexpScanner":http://murfy.de/simple-regexp-scanner * Added new token class :annotation along with CSS styles. ** Should be useful for Python, too. * coderay_suite warns if no scanner was found for this language. * PluginHost#default can be called without parameter (will return default id)
* New: *CSS Scanner* (closes #29).murphy2008-09-183-1/+188
| | | | | | | | | | * Based on Stefan Walk's implementation, with fixes, enhancements and speedups. * It seems to be fairly fast and highlights nicely. * I added the styles for Ignis Draconis, S5, and YUI as example code for testing. More changes: * Added three new token classes, :important, :pseudo_class, and :value, along with CSS styles.
* New: *JavaScript Scanner* (closes #23).murphy2008-09-167-10/+214
| | | | | | | | | | | * It's quite good and fast, but still a beta. * I included Prototype and script.aculo.us as example code for testing. More changes: * Added two new token classes, :keyword and :key, along with CSS styles. ** Actually, we should use :keyword for most scanners that now use :reserved. * HTML Encoder: The CSS parser understands multiple selectors separated by commas.
* Added more file extensions to Scannersmurphy2008-09-166-2/+6
| | | | | | | * Added file_extensions to Delphi, XML, Debug, Scheme, and NitroXHTML scanners. * Removed obsolete extension declarations from Scanner test suites. * Minor cleanups.
* Fixed coderay/for_redcloth escaping.murphy2008-08-281-2/+20
|
* Changed CodeRay.for_redcloth into require 'coderay/for_redcloth'.murphy2008-08-281-35/+35
| | | | | * Cleanup in documentation.rake.
* Added CodeRay.for_redcloth with test and documentation.murphy2008-08-281-0/+54
| | | | | | * Tested with RedCloth 4.0.3. * Also added :ee task for the Ruby Enterprise Edition (rubyee).
* Fixed FileType: .html.erb is now recognized as rhtml.murphy2008-08-111-3/+5
|
* [KK] Just a little code cleanup and new task 187.murphy2008-07-292-2/+4
|
* Improved Ruby scanner to use +/- signs only when appropriate (tests adjusted.)murphy2008-01-212-13/+17
| | | | | Ignore test/scanners/*/*.expected.html
* Lib:murphy2008-01-076-33/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Encoder: removed a warning - Encoders::HTML: don't shadow outer variable - Plugin: move require_plugin into class namespace - Ruby Scanner: - "alias" keyword recognition - better regexp/division distinction - recognize ~, !, !=, and !~ as method names (partly Ruby 1.9 only) - reordered states for speed Tests: - updated coderay-suite to use gem instead of require_gem - general improvements (more colors!, new parameter: new, new syntax lang.test for only and new) - fixed ruby suite - adjusted a lot of Ruby tests (alias uses methods now) - new tests: ruby/operators, ruby/regexp Samples: - fixed/updated ('bout time) Rake tasks: - updated to use new rubygems API
* - Ruby 1.9 fixesmurphy2007-11-222-2/+3
| | | | | | - rake commands for jruby and rubinius - absolutized CodeRay::Tokens::ClassOfKind
* Fixed FileType shebang recognition for empty files. [Jeremy Hinegardner]murphy2007-11-221-5/+24
|
* Declared version 0.7.7.murphy2007-04-251-1/+1
| | | | | Fix/clarification for JRuby (thx@bovi).
* Benchmark, comparison: replaced SilverCity with pygmentsmurphy2007-04-248-20/+26
| | | | | | | A bit of code and documentation cleanup HTML encoder: fixed css class output for NO_HIGHLIGHT tokens when :info is set. Fixed Text encoder.
* New Scanner: Scheme (thanks closure!)murphy2007-01-017-5/+159
| | | | | | | | | | | | | | | Test and example added. Token changed: operator_fat instead of operator_name (for use with LISP-like parentheses). Added file_extension for Scanners. Improved CodeRay::Suite: - uses scanners file extension now - example parameter is now named "only" - only param overwrite MAX_CODE_SIZE_TO_HIGHLIGHT
* Done:murphy2007-01-0121-107/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | General: - Declared version 0.7.6. - Moved WordList, CaseIgnoringWordList, Plugin, PluginHost and FileType into CodeRay namespace. CodeRay should be "clean" now, except for the String#to_unix helper function. - Fixed a bit of documentation. - CodeRay binary: Prepare for streaming switch. Scanners: - Added code= alias for string=. - Added streaming? method: Is this Scanner in streaming mode? - Enhanced error info a bit. - Ruby scanner: - Highlights Regexp heredocs now. They may be added to Ruby 1.9. - Speedups with better support for Ruby 1.9. - Change in whitespace handling (faster and cleaner now.) - Speed up some operator recognition (saving two string comparisons). - Declared C and Plaintext Scanners as Streamable. Tokens: - Changed Text/Block token recognition (#is_a? ::String for Ruby 1.9 support). - New method: Tokens#text yields the code string. - text_size fixed. - Token kind shortcuts (like r for reserved) are now defined in token_classes.rb (instead of encoders/html/classes.rb). Encoders: - Debug Scanner added. - Base encoder class adds to @out when encoding (if @out is set). - A little Tokens scanner speedup. - Text encoder uses text_token. - Statistic encoder counts block tokens. - Smaller changes in XML and HTML encoders. Styles: - cYcnus style defines a debug class now. Duo: - scanner and encoder are now methods. Scanner and Encoder are created (and cached) when needed, not earlier. - Documented. Tests: - Disabled encoder and scanner list check (breaks too often). - Added identity test, which checks if tokens#text matches the input. - Added nocolor switch. Developer tools: - Benchmark uses Encoder#file_extension for output now. - Rakefile: Support for 19, 18, yarv and ruby switches for easy comparing different Ruby versions. - Statistic: Demos are no longer tests.
* Fixed RHTML and NitroXHTML scanners to use new :inline_delimiter tokens.murphy2006-10-202-6/+6
|
* Renamed filetype.rb to file_type.rb.murphy2006-10-201-0/+0
|
* Added Debug scanner (for .raydebug files).murphy2006-10-201-0/+60
|
* Improved Delphi scanner.murphy2006-10-201-6/+23
|
* WordList:murphy2006-10-202-36/+51
| | | | | | | | | | - fixed a bad bug (CaseIgnoringWordList wasn't case ignoring!) - code and doc cleanup - optional caching added - interface minimized (no more WordList.for) FileType: - added raybedug type (see next commits)
* HTML encoder: Fixed :css => :style output and made some code cleanup.murphy2006-10-191-8/+19
|
* Ruby scanner: #{...} delimiters are now :inline_delimiter to solve CSS problem.murphy2006-10-183-3/+4
| | | | | | New token: :inline_delimiter Scanner tests suite revamped: colorization, split up into methods.
* Fixed warning in bench.rb.murphy2006-10-182-19/+35
| | | | | | | | | | 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-182-2/+3
| | | | | | | 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.
* Declared Version 0.7.4!murphy2006-10-171-3/+3
| | | | | | Plugin#all_plugin_names is now called #list. Added some basic functional tests and adjusted statistic.rake.
* Made CodeRay ready Ruby 1.9:murphy2006-10-171-1/+1
| | | | | | - tests failed because :symbol.is_a? String. - ...and Array#shuffle! is already built into Ruby 1.9
* Tests:murphy2006-10-1512-989/+1042
| | | | | | | | | | | | | | | | - improved coderay_suite.rb (random and shuffled tests, max parameter, scannerlang->lang, sorted test cases...) - changed html output extension to .actual.html to svn:ignore them - fixed some tests (deleted $Id$ etc.) - made XHTML testcase work Scanners: - fixed HTML, Delphi and Nitro scanners thanks to new tests Engine: - Tokens#fix and #fix! added (yet to be tested) - improved Scanner#raise_inspect a bit Converted more files to UNIX format (go away, stinkin' \r!)
* Ruby scanner: deleted regexp highlighting (didn't work anyway)murphy2006-09-282-42/+5
| | | | | HTML highlighter: unknown token classes now yield a CSS class with that name instead of :error A new Ruby test
* Fixed Plaintext scanner (crashed on empty text - ouch!!)murphy2006-07-111-1/+2
| | | | Added coderay_stylesheet executable (should be "coderay stylesheet css" or just "coderay sty" some day.)
* rake test now runs in debug mode.murphy2006-07-1123-1661/+1661
| | | | All .rb files converted to UNIX format (where did the \r come from?)