This files lists all changes in the CodeRay library since the 0.8.4 release.
{{toc}}
Fixes for JRuby’s 1.9 mode and minor issues.
- REMOVED obsolete
has_rdocgem specification, fixing a warning.
- NEW method
#scan_restreplacesscan_until(/\z/), which is broken in JRuby 1.6 —1.9 mode.
See #297.
- FIXED LOC counting (should be 0).
See #296.
- FIXED the
IDENTpattern not to use character properties, which are broken in JRuby 1.6 —1.9 mode.
See #297, thanks to banister for reporting!
- ADDED more keywords:
between,databases,distinct,fields,full,having,is,prompt,tables.
See #221, thanks to Etienne Massip again.
- NEW regonizes ColdFusion file type extensions
.cfmand.cfcas XML.
See #298, thanks to Emidio Stani.
Fixes a dangerous JavaScript scanner bug, and a testing problem with Ruby 1.9.1.
- FIXED The functional tests now load the lib directory (instead of the gem) in Ruby 1.9.1.
- FIXED
KEY_CHECK_PATTERNregexp
See #264, thanks to Etienne Massip!
Minor improvements to the Ruby scanner and a fix for Ruby 1.9.
- IMPROVED handling of new hash syntax (keys are marked as
:keynow,
colon is a separate:operatortoken, all idents can be used as keys)
See #257, thanks to WoNáDo! - ADDED
__ENCODING__magic constant (Ruby 1.9) - FIXED: Scanner no longer tries to modify the input string on Ruby 1.9.
See #260, thanks to Jan Lelis!
Support for Rubinius (#251), improved mutlibyte handling, Ruby 1.9 syntax, and valid HTML.
- FIXED: Line tokens use
spanwithdisplay: blockinstead ofdiv, which was invalid HTML (#255).
- IMPROVED handling of encodings in Ruby 1.9: UTF-8 and Windows-1252 are checked.
- NEW: Invalid chars will be converted to
?in Ruby 1.9. - FIXED
string=method for Rubinius. See issue 481 on their site.
- FIXED: Don’t use non-ASCII regexps.
- FIXED: Highlight unexpected lines as
:comment.
- FIXED: Use
ASCII-8BITencoding for now.
- ADDED support for some Ruby 1.9 syntax (#254):
- the
->lambda shortcut - new Hash syntax using colons (
{ a: b })
- the
- FIXED: Use
UTF-8encoding. - IMPROVED unicode support on Ruby 1.8 (#253).
- FIXED recognition of non-ASCII identifiers in Ruby 1.9, JRuby, and Rubinius (#253).
- CHANGED heredoc recognition to ignore delimiters starting with a digit. This is incorrect, but causes less false positives.
- FIXED scanning of comments; nice catch, Rubinius!
(#252)
Updated command line interface and minor scanner fixes for the Diff, HTML, and RHTML scanners.
- FIXED: Partly rewritten, simplified, fixed.
(#244)
- FIXED handling of change headers with code on the same line as the @@ marker.
(#247)
- FIXED a missing regexp modifier that slowed down the scanning.
(#245)
- FIXED highlighting of ERB comment blocks.
(#246)
- FIXED: Documentation of Tokens.
(#218)
- 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).
- FIXED: Don’t keep state of XML scanner between calls for E4X literals.
- FIXED: Close unfinished strings with the correct token kind.
- 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
- FIXED strings are closed correctly
(#138) - FIXED several token kinds had no associated color
(#139) - NEW alias
terminal
Encoders::Terminal in the next release.
- FIXED Don’t close tokens that are not open. Send
:errortoken instead.
- FIXED token kind of closing brackets is
:operatorinstead ofnil
(#148)
- FIXED allow
\operator (namespace separator)
(#209)
- FIXED doesn’t send debug tokens when
$DEBUGis true [Trans]
(#149)
- NEW token classes
:complex,:decorator,:imaginary
(all for Python) - REMOVED token class
:procedure
– use:functionor:methodinstead.
- NEW method
#scanner
- REMOVED methods
.write_token,.read_token,.escape,.unescape
Tokens encoder, which was removed also.
- 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
- REMOVED – use
Tokens#dumpandTokens.load.
- NEW
AFilterencoder has anotherTokensinstance as output.
- NEW
:exclude and :include, that specify which token classes
to include or exclude for the output. They can be a single token class,
an Array of classes, or the value :all.
- NEW
:comment class.
- NEW
KINDS_NOT_LOC token class list
defined by the scanner. It uses the new TokenClassFilter.
Alias: :loc, as in tokens.loc.
- NEW
- NEW (beta, by Rob Aldred)
- NEW option
:title(default value is CodeRay output)
- NEW option
:highlight_lines(default:nil)
- REMOVED option :level
- Uses
Encoderinterface withsuperand#text_token.
FIXED(#94)
- NEW Mapped
:hto:c,:cplusplusand:'c++'to:cpp,
:ecma,:ecmascript,:ecma_scriptto:java_script,
:pascalto:delphi, and:plainto:plaintext.
- NEW constant
KINDS_NOT_LOC
- 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)
- NEW (C++)
- NEW (beta)
- NEW
- NEW (based on Stefan Walk’s work)
- NEW (based on code by Josh Goebel)
- IMPROVED added a list of
:directivetokens that were:reservedbefore - IMPROVED detection of labels
- IMPROVED allow
1Land1LLstyle literals
- IMPROVED element selectors are highlighted as
:typeinstead of:keyword
- IMPROVED Don’t cache tokens in CaseIgnoringWordList.
- 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
- 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
- IMPROVED constants (
true,false,nil) are highlighted as:value
- 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
- IMPROVED indentation detection
- changed a few colors (exceptions, inline strings, predefined types)
- NEW method
#title
- NEW method
#helperloads helpers from different plugins
helper 'other_plugin/helper_name'
- NEW
FileType[]takesPathnameinstances - NEW regonizes
.cc,.cpp,.cp,.cxx,.c++,.C,.hh,.hpp,.h++,.cuextensions (C++)
- 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.
- FIXED (#97)
- FIXED for RedCloth versions 4.2.0+ (#119)
- warnings about character classes [Ruby 1.9]
- encoding issues [Ruby 1.9]
- documentation, code