CodeRay Version History¶
This files lists all changes in the CodeRay library since the 0.8.4 release.
Changes in 0.9.4¶
Updated command line interface and minor scanner fixes for the Diff, HTML, and RHTML scanners.
coderay executable¶
- FIXED: Partly rewritten, simplified, fixed.
(#244)
Scanners::Diff¶
- FIXED handling of change headers with code on the same line as the @@ marker.
(#247)
Scanners::HTML¶
- FIXED a missing regexp modifier that slowed down the scanning.
(#245)
Scanners::RHTML¶
- FIXED highlighting of ERB comment blocks.
(#246)
Changes in 0.9.3¶
- FIXED: Documentation of Tokens.
(#218)
coderay executable¶
- NEW: automatic TTY detection (uses
Termencoder) - NEW: optional 3rd parameter for the filename
- FIXED: Converted to UNIX format.
- FIXED: Warn about generated files.
- FIXED: Ensure line break after the output (especially for LoC counter).
Scanners::JavaScript¶
- FIXED: Don't keep state of XML scanner between calls for E4X literals.
Scanners::Java, Scanners::JSON¶
- FIXED: Close unfinished strings with the correct token kind.
Changes in 0.9.2¶
- NEW Basic tests and a Rakefile are now included in the Gem. [Flameeyes]
Adoctask is also included. - FIXED Use
$CODERAY_DEBUGfor debugging instead of$DEBUG. [Trans]
(#192) - REMOVED
Term::Ansicolorwas bundled under lib/, but not used. [Flameeyes]
(#205) - WORKAROUND for Ruby bug
#2745
Encoders::Term¶
- FIXED strings are closed correctly
(#138) - FIXED several token kinds had no associated color
(#139) - NEW alias
terminalNOTE: This encoder will be renamed to
Encoders::Terminalin the next release.
Scanners::Debug¶
- FIXED Don't close tokens that are not open. Send
:errortoken instead.
Scanners::Groovy¶
- FIXED token kind of closing brackets is
:operatorinstead ofnil
(#148)
Scanners::PHP¶
- FIXED allow
\operator (namespace separator)
(#209)
Scanners::YAML¶
- FIXED doesn't send debug tokens when
$DEBUGis true [Trans]
(#149)
Changes in 0.9.1¶
Token classes¶
- NEW token classes
:complex,:decorator,:imaginary
(all for Python) - REMOVED token class
:procedure
– use:functionor:methodinstead.
Tokens¶
- NEW method
#scannerStores the scanner.
- REMOVED methods
.write_token,.read_token,.escape,.unescapeThey were only used by the
Tokensencoder, which was removed also.
Encoders::Encoder¶
- REMOVED Don't require the stringio library.
- NEW public methods
#open_token,#close_token,#begin_line,#end_line
These methods are called automatically, like#text_token. - NEW proteced method
#append_encoded_token_to_output
Encoders::Tokens¶
- REMOVED – use
Tokens#dumpandTokens.load.
Encoders::Filter¶
- NEW
AFilterencoder has anotherTokensinstance as output.
Encoders::TokenClassFilter¶
- NEW
It takes 2 options,
:excludeand:include, that specify which token classes
to include or exclude for the output. They can be a single token class,
anArrayof classes, or the value:all.
Encoders::CommentFilter¶
- NEW
Removes tokens of the
:commentclass.
Encoders::LinesOfCode¶
- NEW
Counts the lines of code according to the
KINDS_NOT_LOCtoken class list
defined by the scanner. It uses the newTokenClassFilter.Alias:
:loc, as intokens.loc.
Encoders::JSON¶
- NEW
Outputs tokens in a simple JSON format.
Encoders::Term¶
- NEW (beta, by Rob Aldred)
Outputs code highlighted for a color terminal.
Encoders::HTML¶
- NEW option
:title(default value is CodeRay output)Setting this changes the title of the HTML page.
- NEW option
:highlight_lines(default:nil)Highlights the given set of line numbers.
- REMOVED option:levelIt didn't do anything. CodeRay always outputs XHTML.
Encoders::Text¶
- Uses
Encoderinterface withsuperand#text_token.
Encoders::XML¶
FIXED(#94)It didn't work at all.
Scanners¶
- NEW Mapped
:hto:c,:cplusplusand:'c++'to:cpp,
:ecma,:ecmascript,:ecma_scriptto:java_script,
:pascalto:delphi, and:plainto:plaintext.
Scanners::Scanner¶
- NEW constant
KINDS_NOT_LOCA list of all token classes not considered in LOC count.
Added appropriate values for scanners. - NEW method
#langreturns the scanner's lang, which is itsplugin_id. - FIXED automatic, safe UTF-8 detection [Ruby 1.9]
- FIXED column takes care of multibyte encodings [Ruby 1.9]
- FIXED is dumpable (
Tokensstore their scanner in an@scannervariable)
Scanners::Cpp¶
- NEW (C++)
Scanners::Groovy¶
- NEW (beta)
Scanners::Python¶
- NEW
Scanners::PHP¶
- NEW (based on Stefan Walk's work)
Scanners::SQL¶
- NEW (based on code by Josh Goebel)
Scanners::C¶
- IMPROVED added a list of
:directivetokens that were:reservedbefore - IMPROVED detection of labels
- IMPROVED allow
1Land1LLstyle literals
Scanners::CSS¶
- IMPROVED element selectors are highlighted as
:typeinstead of:keyword
Scanners::Delphi¶
- IMPROVED Don't cache tokens in CaseIgnoringWordList.
Scanners::Java¶
- IMPROVED
assertis highlighted as a:keywordnow - IMPROVED
constandgotoare highlighted as:reserved - IMPROVED
false,true, andnullare highlighted as:pre_constant - IMPROVED
threadsafeis no longer a:directive - IMPROVED
Stringis highlighted as a:pre_type - IMPROVED built-in classes ending with Error or Exception are
highlighted as a:exceptioninstead of:pre_type
Scanners::JavaScript¶
- NEW a list of
PREDEFINED_CONSTANTSto be highlighted as:pre_constant - NEW XML literals are recognized and highlighted
- NEW function name highlighting
- IMPROVED
.1is highlighted a number - FIXED strings close with the correct kind when terminated unexpectedly
Scanners::JSON¶
- IMPROVED constants (
true,false,nil) are highlighted as:value
Scanners::Ruby¶
- IMPROVED
Patterns::KEYWORDS_EXPECTING_VALUEfor more accurate
value_expecteddetection - IMPROVED handling of
\as a string delimiter - IMPROVED handling of unicode strings; automatic switching to unicode
- IMPROVED highlighting of
self.methoddefinitions - REMOVED
Patterns::FANCY_START_SAVE(obsolete) - FIXED encoding issues [Ruby 1.9]
- FIXED a problem in early Ruby 1.8.6 patch versions with
Regexp.escape
Scanners::YAML¶
- IMPROVED indentation detection
Styles::Cycnus¶
- changed a few colors (exceptions, inline strings, predefined types)
Plugin¶
- NEW method
#titleSet and get the plugin's title. Titles can be arbitrary strings.
- NEW method #helper loads helpers from different plugins
Use this syntax:
helper 'other_plugin/helper_name'
FileType¶
- NEW
FileType[]takesPathnameinstances - NEW regonizes
.cc,.cpp,.cp,.cxx,.c++,.C,.hh,.hpp,.h++,.cuextensions (C++)Thanks to Sander Cox and the TextMate C bundle.
- NEW regonizes
.pas,.dprextensions (Delphi) - NEW regonizes
.gvy,.groovyextensions (Groovy) - NEW regonizes
.php,.php3,.php4,.php5extensions (PHP) - NEW regonizes
.py,.py3,.pywextensions (Python) - NEW regonizes
.rxmlextension (Ruby) - NEW regonizes
.sqlextension (SQL) - File types list was sorted alphabetically.
CaseIgnoringWordList¶
- FIXED (#97)
The default value is no longer ignored.
ForRedCloth¶
- FIXED for RedCloth versions 4.2.0+ (#119)
Cleanups¶
- warnings about character classes [Ruby 1.9]
- encoding issues [Ruby 1.9]
- documentation, code