Project

General

Profile

Changelog » History » Version 1

Kornelius Kalnbach, 06/11/2010 01:22 PM

1 1 Kornelius Kalnbach
h1=. CodeRay Version History
2 1 Kornelius Kalnbach
 
3 1 Kornelius Kalnbach
p=. _This files lists all changes in the CodeRay library since the 0.8.4 release._
4 1 Kornelius Kalnbach
 
5 1 Kornelius Kalnbach
h2. Changes in 1.0
6 1 Kornelius Kalnbach
 
7 1 Kornelius Kalnbach
h3. Direct Streaming
8 1 Kornelius Kalnbach
 
9 1 Kornelius Kalnbach
CodeRay 1.0 introduces _Direct Streaming_ as a faster and simpler alternative to Tokens. It means that all Scanners, Encoders and Filters had to be rewritten, and that older scanners using the Tokens API are no longer compatible with this version.
10 1 Kornelius Kalnbach
 
11 1 Kornelius Kalnbach
The benefit of this change is more speed (benchmarks show 10% to 50% more tokens per second compared to CodeRay 0.9), a simpler API, and less code.
12 1 Kornelius Kalnbach
 
13 1 Kornelius Kalnbach
Changes related to the new tokens handling include:
14 1 Kornelius Kalnbach
* *CHANGED*: The Scanners now call Encoders directly; tokens are not added to a Tokens array, but are send to the Encoder as a method call. The Tokens representation (which can be seen as a cache now) is still present, but as a special case; Tokens just encodes the given tokens into an Array for later use.
15 1 Kornelius Kalnbach
* *CHANGED*: The token actions (@text_token@, @begin_group@ etc.) are now public methods of @Encoder@ and @Tokens@.
16 1 Kornelius Kalnbach
* *REWRITE* of all Scanners, Encoders, Filters, and Tokens.
17 1 Kornelius Kalnbach
* *RENAMED* @:open@ and @:close@ actions to @:begin_group@ and @:end_group@.
18 1 Kornelius Kalnbach
* *RENAMED* @open_token@ and @close_token@ methods to @begin_group@ and @end_group@.
19 1 Kornelius Kalnbach
* *NEW* method @#tokens@ allows to add several tokens to the stream. @Tokens@ and @Encoders::Encoder@ define this method.
20 1 Kornelius Kalnbach
* *CHANGED* The above name changes also affect the JSON, XML, and YAML encoders. CodeRay 1.0 output will be incompatible with earlier versions.
21 1 Kornelius Kalnbach
* *REMOVED* @TokenStream@ and the @Streamable@ API and all related features like @NotStreamableError@ are now obsolete and have been removed.
22 1 Kornelius Kalnbach
23 1 Kornelius Kalnbach
h3. General changes
24 1 Kornelius Kalnbach
 
25 1 Kornelius Kalnbach
* *IMPROVED* documentation in general; additions, corrections and cleanups
26 1 Kornelius Kalnbach
* *FIXED* some image links in the documentation
27 1 Kornelius Kalnbach
* *IMPROVED* Ruby 1.9 support (_._ not in @$LOAD_PATH@)
28 1 Kornelius Kalnbach
29 1 Kornelius Kalnbach
h3. @Tokens@
30 1 Kornelius Kalnbach
 
31 1 Kornelius Kalnbach
* *REMOVED* methods @#stream?@, @#each_text_token@.
32 1 Kornelius Kalnbach
* *REMOVED* @#text@ and @#text_size@ methods. Use the @Text@ encoder instead.
33 1 Kornelius Kalnbach
* *REMOVED* special implementation of @#each@ taking a filter parameter. Use @TokenKindFilter@ instead.
34 1 Kornelius Kalnbach
* *NEW* methods @encode_with@, @count@, @begin_group@, @end_group@, @begin_line@, and @end_line@.
35 1 Kornelius Kalnbach
36 1 Kornelius Kalnbach
h3. *RENAMED*: @Tokens::AbbreviationForKind@
37 1 Kornelius Kalnbach
 
38 1 Kornelius Kalnbach
Renamed from @ClassOfKind@; the term "token class" is no longer used in CodeRay. Instead, tokens have _kinds_.
39 1 Kornelius Kalnbach
See "#122":http://redmine.rubychan.de/issues/122.
40 1 Kornelius Kalnbach
 
41 1 Kornelius Kalnbach
* *REMOVED* token kinds @:attribute_name_fat@, @:attribute_value_fat@, @:operator_fat@, @:tag_fat@, @:xml_text@, @:open@, and @:close@.
42 1 Kornelius Kalnbach
* *ADDED* token kinds @:filename@, @:namespace@, and @:eyecatcher@.
43 1 Kornelius Kalnbach
* *CHANGED*: Don't raise error for unknown token kinds unless in @$CODERAY_DEBUG@ mode.
44 1 Kornelius Kalnbach
45 1 Kornelius Kalnbach
h3. @Encoders::CommentFilter@
46 1 Kornelius Kalnbach
 
47 1 Kornelius Kalnbach
* *NEW* alias @:remove_comments@
48 1 Kornelius Kalnbach
49 1 Kornelius Kalnbach
h3. @Encoders::Filter@
50 1 Kornelius Kalnbach
 
51 1 Kornelius Kalnbach
* *NEW* option @tokens@.
52 1 Kornelius Kalnbach
* *CHANGED*: Now it simply delegates to the output.
53 1 Kornelius Kalnbach
* *REMOVED* @include_text_token?@ and @include_block_token?@ methods.
54 1 Kornelius Kalnbach
55 1 Kornelius Kalnbach
h3. @Encoders::HTML@
56 1 Kornelius Kalnbach
 
57 1 Kornelius Kalnbach
The HTML encoder was cleaned up and simplified.
58 1 Kornelius Kalnbach
 
59 1 Kornelius Kalnbach
* *CHANGED* the default style to @:alpha@.
60 1 Kornelius Kalnbach
* *NEW*: HTML 5 and CSS 3 compatible, IE incompatible.
61 1 Kornelius Kalnbach
  See "#215":http://redmine.rubychan.de/issues/215.
62 1 Kornelius Kalnbach
* *ADDED* support for @:line_number_anchors@.
63 1 Kornelius Kalnbach
  See "#208":http://redmine.rubychan.de/issues/208.
64 1 Kornelius Kalnbach
* *CHANGED*: Use double click to toggle line numbers in table mode (as single 
65 1 Kornelius Kalnbach
  click jumps to an anchor.)
66 1 Kornelius Kalnbach
* *REMOVED* support for @:line_numbers => :list@.
67 1 Kornelius Kalnbach
* *FIXED* splitting of lines for @:line_numbers => :inline@, so that the line
68 1 Kornelius Kalnbach
  numbers don't get colored, too.
69 1 Kornelius Kalnbach
* *RENAMED* @Output#numerize@ to @#number@, which is an actual English word.
70 1 Kornelius Kalnbach
71 1 Kornelius Kalnbach
h3. @Encoders::LinesOfCode@
72 1 Kornelius Kalnbach
 
73 1 Kornelius Kalnbach
* *CHANGED*: @compile@ and @finish@ methods are now protected.
74 1 Kornelius Kalnbach
75 1 Kornelius Kalnbach
h3. @Encoders::Terminal@
76 1 Kornelius Kalnbach
 
77 1 Kornelius Kalnbach
* *RENAMED* from @Encoders::Term@, added @:term@ alias.
78 1 Kornelius Kalnbach
* *CLEANUP*: Use @#setup@'s @super@, don't use @:procedure@ token class.
79 1 Kornelius Kalnbach
* *CHANGED*: @#token@'s second parameter is no longer optional.
80 1 Kornelius Kalnbach
* *REMOVED* colors for obsolete token kinds.
81 1 Kornelius Kalnbach
* *FIXED* handling of line tokens.
82 1 Kornelius Kalnbach
83 1 Kornelius Kalnbach
h3. @Encoders::Text@
84 1 Kornelius Kalnbach
 
85 1 Kornelius Kalnbach
* *FIXED* default behavior of stripping the trailing newline.
86 1 Kornelius Kalnbach
87 1 Kornelius Kalnbach
h3. *RENAMED*: @Encoders::TokenKindFilter@
88 1 Kornelius Kalnbach
 
89 1 Kornelius Kalnbach
Renamed from @TokenClassFilter@.
90 1 Kornelius Kalnbach
91 1 Kornelius Kalnbach
* *NEW*: Handles token groups.
92 1 Kornelius Kalnbach
  See "#223":http://redmine.rubychan.de/issues/223.
93 1 Kornelius Kalnbach
* *RENAMED* @include_block_token?@ to @include_group?@.
94 1 Kornelius Kalnbach
95 1 Kornelius Kalnbach
h3. @Encoders::Statistic@
96 1 Kornelius Kalnbach
 
97 1 Kornelius Kalnbach
* *CHANGED*: Tokens actions are counted separately.
98 1 Kornelius Kalnbach
99 1 Kornelius Kalnbach
h3. @Encoders::YAML@
100 1 Kornelius Kalnbach
 
101 1 Kornelius Kalnbach
* *NEW* method @call@ for allowing code like @CodeRay::Duo[:python => :yaml].(code)@ in Ruby 1.9.
102 1 Kornelius Kalnbach
103 1 Kornelius Kalnbach
h3. @Scanners::Scanner@
104 1 Kornelius Kalnbach
 
105 1 Kornelius Kalnbach
* *REMOVED* helper method @String#to_unix@.
106 1 Kornelius Kalnbach
* *REMOVED* method @streamable?@.
107 1 Kornelius Kalnbach
* *NEW*: The @#tokenize@ method also takes an Array of Strings as source. The
108 1 Kornelius Kalnbach
  code is highlighted as one and split into parts of the input lengths
109 1 Kornelius Kalnbach
  after that using @Tokens#split_into_parts@.
110 1 Kornelius Kalnbach
111 1 Kornelius Kalnbach
h3. @Scanners::CSS@
112 1 Kornelius Kalnbach
 
113 1 Kornelius Kalnbach
* *NEW*: Rudimentary support for the @attr@, @counter@, and @counters@ functions.
114 1 Kornelius Kalnbach
  See "#224":http://redmine.rubychan.de/issues/224.
115 1 Kornelius Kalnbach
* *NEW*: Rudimentary support for CSS 3 colors.
116 1 Kornelius Kalnbach
* *CHANGED*: Attribute selectors are highlighted as @:attribute_name@ instead of @:string@.
117 1 Kornelius Kalnbach
118 1 Kornelius Kalnbach
h3. @Scanners::Debug@
119 1 Kornelius Kalnbach
 
120 1 Kornelius Kalnbach
* *NEW*: Support for line tokens (@begin_line@ and @end_line@ represented by @[@ and @]@.)
121 1 Kornelius Kalnbach
* *FIXED*: Don't send @:error@ and @nil@ tokens for buggy input any more.
122 1 Kornelius Kalnbach
* *FIXED*: Closes unclosed tokens at the end of @scan_tokens@.
123 1 Kornelius Kalnbach
* *IMPROVED*: Highlight unknown tokens as @:error@.
124 1 Kornelius Kalnbach
* *CHANGED*: Raises an error when trying to end an invalid token group.
125 1 Kornelius Kalnbach
126 1 Kornelius Kalnbach
h3. @Scanners::Delphi@
127 1 Kornelius Kalnbach
 
128 1 Kornelius Kalnbach
* *FIXED*: Closes open string groups.
129 1 Kornelius Kalnbach
130 1 Kornelius Kalnbach
h3. @Scanners::Diff@
131 1 Kornelius Kalnbach
 
132 1 Kornelius Kalnbach
* *NEW*: Highlighting of code based on file names.
133 1 Kornelius Kalnbach
  See ticket "#52":http://redmine.rubychan.de/issues/52.
134 1 Kornelius Kalnbach
  
135 1 Kornelius Kalnbach
  Use the @:highlight_code@ option to turn this feature off. It's enabled
136 1 Kornelius Kalnbach
  by default.
137 1 Kornelius Kalnbach
  
138 1 Kornelius Kalnbach
  This is a very original feature. It enables multi-language highlighting for
139 1 Kornelius Kalnbach
  diff files, which is especially helpful for CodeRay development itself. The
140 1 Kornelius Kalnbach
  updated version of the scanner test suite generated .debug.diff.html files
141 1 Kornelius Kalnbach
  using this.
142 1 Kornelius Kalnbach
  
143 1 Kornelius Kalnbach
  Note: This is still experimental. Tokens spanning more than one line
144 1 Kornelius Kalnbach
  may get highlighted incorrectly. CodeRay tries to keep scanner states
145 1 Kornelius Kalnbach
  between the lines and changes, but the quality of the results depend on
146 1 Kornelius Kalnbach
  the scanner.
147 1 Kornelius Kalnbach
* *NEW*: Inline change highlighting, as suggested by Eric Thomas.
148 1 Kornelius Kalnbach
  See ticket "#227":http://redmine.rubychan.de/issues/227 for details.
149 1 Kornelius Kalnbach
  
150 1 Kornelius Kalnbach
  Use the @:inline_diff@ option to turn this feature off. It's enabled by
151 1 Kornelius Kalnbach
  default.
152 1 Kornelius Kalnbach
  
153 1 Kornelius Kalnbach
  For single-line changes (that is, a single deleted line followed by a single
154 1 Kornelius Kalnbach
  inserted line), this feature surrounds the changed parts with an
155 1 Kornelius Kalnbach
  @:eyecatcher@ group which appears in a more saturated background color.
156 1 Kornelius Kalnbach
  The implementation is quite complex, and highly experimental. The problem
157 1 Kornelius Kalnbach
  with multi-layer tokenizing is that the tokens have to be split into parts.
158 1 Kornelius Kalnbach
  If the inline change starts, say, in the middle of a string, then additional
159 1 Kornelius Kalnbach
  @:end_group@ and @:begin_group@ tokens must be inserted to keep the group
160 1 Kornelius Kalnbach
  nesting intact. The extended @Scanner#tokenize@ method and the new
161 1 Kornelius Kalnbach
  @Tokens#split_into_parts@ method take care of this.
162 1 Kornelius Kalnbach
* *NEW*: Highlight the file name in the change headers as @:filename@.
163 1 Kornelius Kalnbach
* *CHANGED*: Highlight unknown lines as @:comment@ instead of @:head@.
164 1 Kornelius Kalnbach
165 1 Kornelius Kalnbach
h3. @Scanners::HTML@
166 1 Kornelius Kalnbach
 
167 1 Kornelius Kalnbach
* *FIXED*: Closes open string groups.
168 1 Kornelius Kalnbach
169 1 Kornelius Kalnbach
h3. @Scanners::JavaScript@
170 1 Kornelius Kalnbach
 
171 1 Kornelius Kalnbach
* *IMPROVED*: Added @NaN@ and @Infinity@ to list of predefined constants.
172 1 Kornelius Kalnbach
173 1 Kornelius Kalnbach
h3. @Scanners::Java@
174 1 Kornelius Kalnbach
 
175 1 Kornelius Kalnbach
* *NEW*: Package names are highlighted as @:namespace@.
176 1 Kornelius Kalnbach
  See "#210":http://redmine.rubychan.de/issues/210.
177 1 Kornelius Kalnbach
178 1 Kornelius Kalnbach
h3. @Scanners::Plaintext@
179 1 Kornelius Kalnbach
 
180 1 Kornelius Kalnbach
* *IMPROVED*: Just returns the string without scanning (faster).
181 1 Kornelius Kalnbach
 
182 1 Kornelius Kalnbach
 This is much faster than scanning until @/\z/@ in Ruby 1.8.
183 1 Kornelius Kalnbach
184 1 Kornelius Kalnbach
h3. @Scanners::Python@
185 1 Kornelius Kalnbach
 
186 1 Kornelius Kalnbach
* *CHANGED*: Docstrings are highlighted as @:comment@.
187 1 Kornelius Kalnbach
  See "#190":http://redmine.rubychan.de/issues/190.
188 1 Kornelius Kalnbach
189 1 Kornelius Kalnbach
h3. *NEW*: @Scanners::Raydebug@
190 1 Kornelius Kalnbach
 
191 1 Kornelius Kalnbach
Copied from @Scanners::Debug@, highlights the token dump instead of importing it. It also reacts to the @.raydebug@ file name suffix now.
192 1 Kornelius Kalnbach
193 1 Kornelius Kalnbach
h3. @Scanners::Ruby@
194 1 Kornelius Kalnbach
 
195 1 Kornelius Kalnbach
* *ADDED* more predefined keywords (see http://murfy.de/ruby-constants).
196 1 Kornelius Kalnbach
* *IMPROVED* support for singleton method definitions.
197 1 Kornelius Kalnbach
  See "#147":http://redmine.rubychan.de/issues/147.
198 1 Kornelius Kalnbach
* *FIXED*: Don't highlight methods with a capital letter as constants
199 1 Kornelius Kalnbach
  (eg. GL.PushMatrix).
200 1 Kornelius Kalnbach
* *NEW*: Highlight buggy floats (like .5) as @:error@.
201 1 Kornelius Kalnbach
* *CLEANUP* of documentation, names of constants and variables, state handling.
202 1 Kornelius Kalnbach
* *NEW*: Complicated rule for recognition of @foo=@ style method names.
203 1 Kornelius Kalnbach
* *NEW*: Handles @:keep_state@ option (a bit; experimental).
204 1 Kornelius Kalnbach
  
205 1 Kornelius Kalnbach
  Actually, Ruby checks if there is @[~>=]@, but not @=>@ following the name.
206 1 Kornelius Kalnbach
207 1 Kornelius Kalnbach
h3. @Scanners::Scheme@
208 1 Kornelius Kalnbach
 
209 1 Kornelius Kalnbach
* *CHANGED*: Does use @:operator@ instead of @:operator_fat@ now.
210 1 Kornelius Kalnbach
211 1 Kornelius Kalnbach
h3. @Scanners::SQL@
212 1 Kornelius Kalnbach
 
213 1 Kornelius Kalnbach
* *IMPROVED*: Extended list of keywords and functions (thanks to Joshua Galvez).
214 1 Kornelius Kalnbach
 
215 1 Kornelius Kalnbach
  See "#221":http://redmine.rubychan.de/issues/221.
216 1 Kornelius Kalnbach
* *FIXED*: Closes open string groups.
217 1 Kornelius Kalnbach
218 1 Kornelius Kalnbach
h3. @Scanners::YAML@
219 1 Kornelius Kalnbach
 
220 1 Kornelius Kalnbach
* *FIXED*: Allow spaces before colon in mappings.
221 1 Kornelius Kalnbach
 
222 1 Kornelius Kalnbach
  See "#231":http://redmine.rubychan.de/issues/231.
223 1 Kornelius Kalnbach
224 1 Kornelius Kalnbach
h3. *NEW*: @Styles::Alpha@
225 1 Kornelius Kalnbach
 
226 1 Kornelius Kalnbach
A style that uses transparent HSLA colors as defined in CSS 3.
227 1 Kornelius Kalnbach
See "#199":http://redmine.rubychan.de/issues/199.
228 1 Kornelius Kalnbach
229 1 Kornelius Kalnbach
h3. @FileType@
230 1 Kornelius Kalnbach
 
231 1 Kornelius Kalnbach
* *REMOVED* @FileType#shebang@ is a protected method now.
232 1 Kornelius Kalnbach
* *NEW*: Recognizes @.gemspec@, @.rjs@, @.rpdf@ extensions and @Capfile@ as Ruby.
233 1 Kornelius Kalnbach
  
234 1 Kornelius Kalnbach
  Thanks to the authors of the TextMate Ruby bundle!
235 1 Kornelius Kalnbach
236 1 Kornelius Kalnbach
h3. @Plugin@
237 1 Kornelius Kalnbach
 
238 1 Kornelius Kalnbach
* *IMPROVED*: @register_for@ sets the @plugin_id@; it can now be a @Symbol@.
239 1 Kornelius Kalnbach
240 1 Kornelius Kalnbach
h3. Internal API changes
241 1 Kornelius Kalnbach
 
242 1 Kornelius Kalnbach
* *FIXED* @Encoders::HTML#token@'s second parameter is no longer optional.
243 1 Kornelius Kalnbach
244 1 Kornelius Kalnbach
245 1 Kornelius Kalnbach
h2. Changes in 0.9.3
246 1 Kornelius Kalnbach
 
247 1 Kornelius Kalnbach
* *FIXED*: Documentation of Tokens.
248 1 Kornelius Kalnbach
  ("#218":http://redmine.rubychan.de/issues/218)
249 1 Kornelius Kalnbach
 
250 1 Kornelius Kalnbach
h3. @coderay@ executable
251 1 Kornelius Kalnbach
 
252 1 Kornelius Kalnbach
* *NEW*: automatic TTY detection (uses @Term@ encoder)
253 1 Kornelius Kalnbach
* *NEW*: optional 3rd parameter for the filename
254 1 Kornelius Kalnbach
* *FIXED*: Converted to UNIX format.
255 1 Kornelius Kalnbach
* *FIXED*: Warn about generated files.
256 1 Kornelius Kalnbach
* *FIXED*: Ensure line break after the output (especially for LoC counter).
257 1 Kornelius Kalnbach
258 1 Kornelius Kalnbach
h3. @Scanners::JavaScript@
259 1 Kornelius Kalnbach
 
260 1 Kornelius Kalnbach
* *FIXED*: Don't keep state of XML scanner between calls for E4X literals.
261 1 Kornelius Kalnbach
262 1 Kornelius Kalnbach
h3. @Scanners::Java@, @Scanners::JSON@
263 1 Kornelius Kalnbach
 
264 1 Kornelius Kalnbach
* *FIXED*: Close unfinished strings with the correct token kind.
265 1 Kornelius Kalnbach
266 1 Kornelius Kalnbach
267 1 Kornelius Kalnbach
h2. Changes in 0.9.2
268 1 Kornelius Kalnbach
 
269 1 Kornelius Kalnbach
* *NEW* Basic tests and a _Rakefile_ are now included in the Gem. [Flameeyes]
270 1 Kornelius Kalnbach
  A @doc@ task is also included.
271 1 Kornelius Kalnbach
* *FIXED* Use @$CODERAY_DEBUG@ for debugging instead of @$DEBUG@. [Trans]
272 1 Kornelius Kalnbach
  ("#192":http://redmine.rubychan.de/issues/192)
273 1 Kornelius Kalnbach
* *REMOVED* @Term::Ansicolor@ was bundled under _lib/_, but not used. [Flameeyes]
274 1 Kornelius Kalnbach
  ("#205":http://redmine.rubychan.de/issues/205)
275 1 Kornelius Kalnbach
* *WORKAROUND* for Ruby bug 
276 1 Kornelius Kalnbach
  "#2745":http://redmine.ruby-lang.org/issues/show/2745
277 1 Kornelius Kalnbach
 
278 1 Kornelius Kalnbach
h3. @Encoders::Term@
279 1 Kornelius Kalnbach
 
280 1 Kornelius Kalnbach
* *FIXED* strings are closed correctly
281 1 Kornelius Kalnbach
  ("#138":http://redmine.rubychan.de/issues/138)
282 1 Kornelius Kalnbach
* *FIXED* several token kinds had no associated color
283 1 Kornelius Kalnbach
  ("#139":http://redmine.rubychan.de/issues/139)
284 1 Kornelius Kalnbach
* *NEW* alias @terminal@
285 1 Kornelius Kalnbach
  
286 1 Kornelius Kalnbach
  *NOTE:* This encoder will be renamed to @Encoders::Terminal@ in the next release.
287 1 Kornelius Kalnbach
288 1 Kornelius Kalnbach
h3. @Scanners::Debug@
289 1 Kornelius Kalnbach
 
290 1 Kornelius Kalnbach
* *FIXED* Don't close tokens that are not open. Send @:error@ token instead.
291 1 Kornelius Kalnbach
292 1 Kornelius Kalnbach
h3. @Scanners::Groovy@
293 1 Kornelius Kalnbach
 
294 1 Kornelius Kalnbach
* *FIXED* token kind of closing brackets is @:operator@ instead of @nil@
295 1 Kornelius Kalnbach
  ("#148":http://redmine.rubychan.de/issues/148)
296 1 Kornelius Kalnbach
297 1 Kornelius Kalnbach
h3. @Scanners::PHP@
298 1 Kornelius Kalnbach
 
299 1 Kornelius Kalnbach
* *FIXED* allow @\@ operator (namespace separator)
300 1 Kornelius Kalnbach
  ("#209":http://redmine.rubychan.de/issues/209)
301 1 Kornelius Kalnbach
302 1 Kornelius Kalnbach
h3. @Scanners::YAML@
303 1 Kornelius Kalnbach
 
304 1 Kornelius Kalnbach
* *FIXED* doesn't send debug tokens when @$DEBUG@ is true [Trans]
305 1 Kornelius Kalnbach
  ("#149":http://redmine.rubychan.de/issues/149)
306 1 Kornelius Kalnbach
307 1 Kornelius Kalnbach
308 1 Kornelius Kalnbach
h2. Changes in 0.9.1
309 1 Kornelius Kalnbach
 
310 1 Kornelius Kalnbach
h3. Token classes
311 1 Kornelius Kalnbach
 
312 1 Kornelius Kalnbach
* *NEW* token classes @:complex@, @:decorator@, @:imaginary@
313 1 Kornelius Kalnbach
  (all for Python)
314 1 Kornelius Kalnbach
* *REMOVED* token class @:procedure@
315 1 Kornelius Kalnbach
  – use @:function@ or @:method@ instead.
316 1 Kornelius Kalnbach
317 1 Kornelius Kalnbach
h3. @Tokens@
318 1 Kornelius Kalnbach
 
319 1 Kornelius Kalnbach
* *NEW* method @#scanner@
320 1 Kornelius Kalnbach
  
321 1 Kornelius Kalnbach
  Stores the scanner.
322 1 Kornelius Kalnbach
* *REMOVED* methods @.write_token@, @.read_token@, @.escape@, @.unescape@
323 1 Kornelius Kalnbach
  
324 1 Kornelius Kalnbach
  They were only used by the @Tokens@ encoder, which was removed also.
325 1 Kornelius Kalnbach
326 1 Kornelius Kalnbach
h3. @Encoders::Encoder@
327 1 Kornelius Kalnbach
 
328 1 Kornelius Kalnbach
* *REMOVED* Don't require the _stringio_ library.
329 1 Kornelius Kalnbach
* *NEW* public methods @#open_token@, @#close_token@, @#begin_line@, @#end_line@
330 1 Kornelius Kalnbach
  These methods are called automatically, like @#text_token@.
331 1 Kornelius Kalnbach
* *NEW* proteced method @#append_encoded_token_to_output@
332 1 Kornelius Kalnbach
333 1 Kornelius Kalnbach
h3. @Encoders::Tokens@
334 1 Kornelius Kalnbach
 
335 1 Kornelius Kalnbach
* *REMOVED* – use @Tokens#dump@ and @Tokens.load@.
336 1 Kornelius Kalnbach
337 1 Kornelius Kalnbach
h3. @Encoders::Filter@
338 1 Kornelius Kalnbach
 
339 1 Kornelius Kalnbach
* *NEW*
340 1 Kornelius Kalnbach
  A @Filter@ encoder has another @Tokens@ instance as output.
341 1 Kornelius Kalnbach
342 1 Kornelius Kalnbach
h3. @Encoders::TokenClassFilter@
343 1 Kornelius Kalnbach
 
344 1 Kornelius Kalnbach
* *NEW*
345 1 Kornelius Kalnbach
  
346 1 Kornelius Kalnbach
  It takes 2 options, @:exclude@ and @:include@, that specify which token classes
347 1 Kornelius Kalnbach
  to include or exclude for the output. They can be a single token class,
348 1 Kornelius Kalnbach
  an @Array@ of classes, or the value @:all@.
349 1 Kornelius Kalnbach
350 1 Kornelius Kalnbach
h3. @Encoders::CommentFilter@
351 1 Kornelius Kalnbach
 
352 1 Kornelius Kalnbach
* *NEW*
353 1 Kornelius Kalnbach
  
354 1 Kornelius Kalnbach
  Removes tokens of the @:comment@ class.
355 1 Kornelius Kalnbach
356 1 Kornelius Kalnbach
h3. @Encoders::LinesOfCode@
357 1 Kornelius Kalnbach
 
358 1 Kornelius Kalnbach
* *NEW*
359 1 Kornelius Kalnbach
  
360 1 Kornelius Kalnbach
  Counts the lines of code according to the @KINDS_NOT_LOC@ token class list
361 1 Kornelius Kalnbach
  defined by the scanner. It uses the new @TokenClassFilter@.
362 1 Kornelius Kalnbach
  
363 1 Kornelius Kalnbach
  Alias: @:loc@, as in @tokens.loc@.
364 1 Kornelius Kalnbach
365 1 Kornelius Kalnbach
h3. @Encoders::JSON@
366 1 Kornelius Kalnbach
 
367 1 Kornelius Kalnbach
* *NEW*
368 1 Kornelius Kalnbach
  
369 1 Kornelius Kalnbach
  Outputs tokens in a simple JSON format.
370 1 Kornelius Kalnbach
371 1 Kornelius Kalnbach
h3. @Encoders::Term@
372 1 Kornelius Kalnbach
 
373 1 Kornelius Kalnbach
* *NEW* (beta, by Rob Aldred)
374 1 Kornelius Kalnbach
  
375 1 Kornelius Kalnbach
  Outputs code highlighted for a color terminal.
376 1 Kornelius Kalnbach
377 1 Kornelius Kalnbach
h3. @Encoders::HTML@
378 1 Kornelius Kalnbach
 
379 1 Kornelius Kalnbach
* *NEW* option @:title@ (default value is _CodeRay output_)
380 1 Kornelius Kalnbach
  
381 1 Kornelius Kalnbach
  Setting this changes the title of the HTML page.
382 1 Kornelius Kalnbach
* *NEW* option @:highlight_lines@ (default: @nil@)
383 1 Kornelius Kalnbach
  
384 1 Kornelius Kalnbach
  Highlights the given set of line numbers.
385 1 Kornelius Kalnbach
- *REMOVED* option @:level@
386 1 Kornelius Kalnbach
  
387 1 Kornelius Kalnbach
  It didn't do anything. CodeRay always outputs XHTML.
388 1 Kornelius Kalnbach
389 1 Kornelius Kalnbach
h3. @Encoders::Text@
390 1 Kornelius Kalnbach
 
391 1 Kornelius Kalnbach
* Uses @Encoder@ interface with @super@ and @#text_token@.
392 1 Kornelius Kalnbach
393 1 Kornelius Kalnbach
h3. @Encoders::XML@
394 1 Kornelius Kalnbach
 
395 1 Kornelius Kalnbach
* @FIXED@ ("#94":http://redmine.rubychan.de/issues/94)
396 1 Kornelius Kalnbach
  
397 1 Kornelius Kalnbach
  It didn't work at all.
398 1 Kornelius Kalnbach
399 1 Kornelius Kalnbach
h3. Scanners
400 1 Kornelius Kalnbach
 
401 1 Kornelius Kalnbach
* *NEW* Mapped @:h@ to @:c@, @:cplusplus@ and @:'c++'@ to @:cpp@,
402 1 Kornelius Kalnbach
  @:ecma@, @:ecmascript@, @:ecma_script@ to @:java_script@,
403 1 Kornelius Kalnbach
  @:pascal@ to @:delphi@, and @:plain@ to @:plaintext@.
404 1 Kornelius Kalnbach
405 1 Kornelius Kalnbach
h3. @Scanners::Scanner@
406 1 Kornelius Kalnbach
 
407 1 Kornelius Kalnbach
* *NEW* constant @KINDS_NOT_LOC@
408 1 Kornelius Kalnbach
  
409 1 Kornelius Kalnbach
  A list of all token classes not considered in LOC count.
410 1 Kornelius Kalnbach
  Added appropriate values for scanners.
411 1 Kornelius Kalnbach
* *NEW* method @#lang@ returns the scanner's lang, which is its @plugin_id@.
412 1 Kornelius Kalnbach
* *FIXED* automatic, safe UTF-8 detection _[Ruby 1.9]_
413 1 Kornelius Kalnbach
* *FIXED* column takes care of multibyte encodings _[Ruby 1.9]_
414 1 Kornelius Kalnbach
* *FIXED* is dumpable (@Tokens@ store their scanner in an @@scanner@ variable)
415 1 Kornelius Kalnbach
416 1 Kornelius Kalnbach
h3. @Scanners::Cpp@
417 1 Kornelius Kalnbach
 
418 1 Kornelius Kalnbach
* *NEW* (C++)
419 1 Kornelius Kalnbach
420 1 Kornelius Kalnbach
h3. @Scanners::Groovy@
421 1 Kornelius Kalnbach
 
422 1 Kornelius Kalnbach
* *NEW* (beta)
423 1 Kornelius Kalnbach
424 1 Kornelius Kalnbach
h3. @Scanners::Python@
425 1 Kornelius Kalnbach
 
426 1 Kornelius Kalnbach
* *NEW*
427 1 Kornelius Kalnbach
428 1 Kornelius Kalnbach
h3. @Scanners::PHP@
429 1 Kornelius Kalnbach
 
430 1 Kornelius Kalnbach
* *NEW* (based on Stefan Walk's work)
431 1 Kornelius Kalnbach
432 1 Kornelius Kalnbach
h3. @Scanners::SQL@
433 1 Kornelius Kalnbach
 
434 1 Kornelius Kalnbach
* *NEW* (based on code by Josh Goebel)
435 1 Kornelius Kalnbach
436 1 Kornelius Kalnbach
h3. @Scanners::C@
437 1 Kornelius Kalnbach
 
438 1 Kornelius Kalnbach
* *IMPROVED* added a list of @:directive@ tokens that were @:reserved@ before
439 1 Kornelius Kalnbach
* *IMPROVED* detection of labels
440 1 Kornelius Kalnbach
* *IMPROVED* allow @1L@ and @1LL@ style literals
441 1 Kornelius Kalnbach
442 1 Kornelius Kalnbach
h3. @Scanners::CSS@
443 1 Kornelius Kalnbach
 
444 1 Kornelius Kalnbach
* *IMPROVED* element selectors are highlighted as @:type@ instead of @:keyword@
445 1 Kornelius Kalnbach
446 1 Kornelius Kalnbach
h3. @Scanners::Delphi@
447 1 Kornelius Kalnbach
 
448 1 Kornelius Kalnbach
* *IMPROVED* Don't cache tokens in CaseIgnoringWordList.
449 1 Kornelius Kalnbach
450 1 Kornelius Kalnbach
h3. @Scanners::Java@
451 1 Kornelius Kalnbach
 
452 1 Kornelius Kalnbach
* *IMPROVED* @assert@ is highlighted as a @:keyword@ now
453 1 Kornelius Kalnbach
* *IMPROVED* @const@ and @goto@ are highlighted as @:reserved@
454 1 Kornelius Kalnbach
* *IMPROVED* @false@, @true@, and @null@ are highlighted as @:pre_constant@
455 1 Kornelius Kalnbach
* *IMPROVED* @threadsafe@ is no longer a @:directive@
456 1 Kornelius Kalnbach
* *IMPROVED* @String@ is highlighted as a @:pre_type@
457 1 Kornelius Kalnbach
* *IMPROVED* built-in classes ending with _Error_ or _Exception_ are
458 1 Kornelius Kalnbach
  highlighted as a @:exception@ instead of @:pre_type@
459 1 Kornelius Kalnbach
460 1 Kornelius Kalnbach
h3. @Scanners::JavaScript@
461 1 Kornelius Kalnbach
 
462 1 Kornelius Kalnbach
* *NEW* a list of @PREDEFINED_CONSTANTS@ to be highlighted as @:pre_constant@
463 1 Kornelius Kalnbach
* *NEW* XML literals are recognized and highlighted
464 1 Kornelius Kalnbach
* *NEW* function name highlighting
465 1 Kornelius Kalnbach
* *IMPROVED* @.1@ is highlighted a number
466 1 Kornelius Kalnbach
* *FIXED* strings close with the correct kind when terminated unexpectedly
467 1 Kornelius Kalnbach
468 1 Kornelius Kalnbach
h3. @Scanners::JSON@
469 1 Kornelius Kalnbach
 
470 1 Kornelius Kalnbach
* *IMPROVED* constants (@true@, @false@, @nil@) are highlighted as @:value@
471 1 Kornelius Kalnbach
472 1 Kornelius Kalnbach
h3. @Scanners::Ruby@
473 1 Kornelius Kalnbach
 
474 1 Kornelius Kalnbach
* *IMPROVED* @Patterns::KEYWORDS_EXPECTING_VALUE@ for more accurate
475 1 Kornelius Kalnbach
  @value_expected@ detection
476 1 Kornelius Kalnbach
* *IMPROVED* handling of @\@ as a string delimiter
477 1 Kornelius Kalnbach
* *IMPROVED* handling of unicode strings; automatic switching to unicode
478 1 Kornelius Kalnbach
* *IMPROVED* highlighting of @self.method@ definitions
479 1 Kornelius Kalnbach
* *REMOVED* @Patterns::FANCY_START_SAVE@ (obsolete)
480 1 Kornelius Kalnbach
* *FIXED* encoding issues _[Ruby 1.9]_
481 1 Kornelius Kalnbach
* *FIXED* a problem in early Ruby 1.8.6 patch versions with @Regexp.escape@
482 1 Kornelius Kalnbach
483 1 Kornelius Kalnbach
h3. @Scanners::YAML@
484 1 Kornelius Kalnbach
 
485 1 Kornelius Kalnbach
* *IMPROVED* indentation detection
486 1 Kornelius Kalnbach
487 1 Kornelius Kalnbach
h3. @Styles::Cycnus@
488 1 Kornelius Kalnbach
 
489 1 Kornelius Kalnbach
* changed a few colors (exceptions, inline strings, predefined types)
490 1 Kornelius Kalnbach
491 1 Kornelius Kalnbach
h3. @Plugin@
492 1 Kornelius Kalnbach
 
493 1 Kornelius Kalnbach
* *NEW* method @#title@
494 1 Kornelius Kalnbach
  
495 1 Kornelius Kalnbach
  Set and get the plugin's title. Titles can be arbitrary strings.
496 1 Kornelius Kalnbach
* *NEW* method @#helper@ loads helpers from different plugins
497 1 Kornelius Kalnbach
  
498 1 Kornelius Kalnbach
  Use this syntax: @helper 'other_plugin/helper_name'@
499 1 Kornelius Kalnbach
500 1 Kornelius Kalnbach
h3. @FileType@
501 1 Kornelius Kalnbach
 
502 1 Kornelius Kalnbach
* *NEW* @FileType[]@ takes @Pathname@ instances
503 1 Kornelius Kalnbach
* *NEW* regonizes @.cc@, @.cpp@, @.cp@, @.cxx@, @.c++@, @.C@, @.hh@, @.hpp@, @.h++@, @.cu@ extensions (C++)
504 1 Kornelius Kalnbach
  
505 1 Kornelius Kalnbach
  Thanks to Sander Cox and the TextMate C bundle.
506 1 Kornelius Kalnbach
* *NEW* regonizes @.pas@, @.dpr@ extensions (Delphi)
507 1 Kornelius Kalnbach
* *NEW* regonizes @.gvy@, @.groovy@ extensions (Groovy)
508 1 Kornelius Kalnbach
* *NEW* regonizes @.php@, @.php3@, @.php4@, @.php5@ extensions (PHP)
509 1 Kornelius Kalnbach
* *NEW* regonizes @.py@, @.py3@, @.pyw@ extensions (Python)
510 1 Kornelius Kalnbach
* *NEW* regonizes @.rxml@ extension (Ruby)
511 1 Kornelius Kalnbach
* *NEW* regonizes @.sql@ extension (SQL)
512 1 Kornelius Kalnbach
* File types list was sorted alphabetically.
513 1 Kornelius Kalnbach
514 1 Kornelius Kalnbach
h3. @CaseIgnoringWordList@
515 1 Kornelius Kalnbach
 
516 1 Kornelius Kalnbach
* *FIXED* ("#97":http://redmine.rubychan.de/issues/97)
517 1 Kornelius Kalnbach
  
518 1 Kornelius Kalnbach
  The default value is no longer ignored.
519 1 Kornelius Kalnbach
520 1 Kornelius Kalnbach
h3. @ForRedCloth@
521 1 Kornelius Kalnbach
 
522 1 Kornelius Kalnbach
* *FIXED* for RedCloth versions 4.2.0+ ("#119":http://redmine.rubychan.de/issues/119)
523 1 Kornelius Kalnbach
524 1 Kornelius Kalnbach
h3. Cleanups
525 1 Kornelius Kalnbach
 
526 1 Kornelius Kalnbach
* warnings about character classes _[Ruby 1.9]_
527 1 Kornelius Kalnbach
* encoding issues _[Ruby 1.9]_
528 1 Kornelius Kalnbach
* documentation, code