summaryrefslogtreecommitdiff
path: root/lib/coderay/encoders
Commit message (Collapse)AuthorAgeFilesLines
...
* - Ruby 1.9 fixesmurphy2007-11-221-1/+1
| | | | | | - rake commands for jruby and rubinius - absolutized CodeRay::Tokens::ClassOfKind
* Benchmark, comparison: replaced SilverCity with pygmentsmurphy2007-04-243-5/+9
| | | | | | | A bit of code and documentation cleanup HTML encoder: fixed css class output for NO_HIGHLIGHT tokens when :info is set. Fixed Text encoder.
* Done:murphy2007-01-018-118/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 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-181-0/+1
| | | | | | New token: :inline_delimiter Scanner tests suite revamped: colorization, split up into methods.
* Ruby scanner: deleted regexp highlighting (didn't work anyway)murphy2006-09-281-2/+5
| | | | | HTML highlighter: unknown token classes now yield a CSS class with that name instead of :error A new Ruby test
* rake test now runs in debug mode.murphy2006-07-1116-868/+868
| | | | All .rb files converted to UNIX format (where did the \r come from?)
* Changed error handling of all scanners: :error tokens are OK now, even in ↵murphy2006-07-111-245/+249
| | | | | | | | | | | | | 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-1017-922/+922
|
* Encoders::HTML: Removed option caching.murphy2006-06-281-9/+1
|
* new version: 0.7.1murphy2006-05-111-0/+21
| | | | | | | improved bin/coderay and included it into package added gem:install task added Duo#highlight (alias for encode) fixed a Plugin bug
* Re-indented everything. Sorry to break the blame chain.murphy2006-04-1613-164/+187
|
* All scanners revisited not to produce errors unless in DEBUG mode. [thx@Daniel]murphy2006-04-161-3/+11
| | | | | | | 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-4/+1
| | | | | | | | | | 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-103-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* HTML Encoder: inline numerization corrected.murphy2006-03-231-1/+3
| | | | | | | | New demo: demo/demo_html_list.rb. Some demos adjusted. C Scanner: error messages fixed. Rakefile: test_demos now in debug mode. test/suite.rb is using reusable Scanners now.
* CodeRay::Duo added for cool caching!murphy2006-03-213-25/+22
| | | | | | | | bench/caching.rb added t´for demonstrating this. HTML Encoder: creates unwrapped output by default (still problems with that.) Numerizing changed (doesn't try to prevent nesting errors) Speedup: "::String" is faster.
* Changed HTML encoder evil char handling (allowing for UTF-8 now.)murphy2006-03-161-5/+6
|
* HTML Encoder: hints fixed and improved. Still in progress.murphy2006-03-161-4/+9
| | | | | Documentation cleanups.
* Fixed HTML encoder again. (Run the test, baka!)murphy2006-03-161-1/+1
| | | | | | Added jarh.out.raydebug test output. Fixed a typo in Rakefile.
* Fixed HTML encoder.murphy2006-03-152-14/+13
| | | | | Changed HTML::CSS.load_stylesheet behaviour.
* HTML encoder improved (hint handling, :info_long)murphy2006-03-151-20/+28
| | | | Ignore latex encoder until it's finished.
* Ruby scanner errors fixed.murphy2006-03-152-3/+3
| | | | | demo_dump and demo_encoder updated for new YAML version. Fixes in output.rb and numerization.rb
* Plugin System extended:murphy2005-12-104-6/+6
| | | | | | | | | | - 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)
* Some fixes for cYcnus style (capital Y makes problems)murphy2005-12-052-2/+2
| | | | | Fixes in the coderay_rdoc_template.
* New Style system added - still beta.murphy2005-11-135-124/+49
| | | | | | | | Demos adjusted coderay.rb, encoders/html.rb, encoders/div.rb adjusted. encoders/html/* files rebuild.
* helpers/plugin.rb: New plugin mapping systemmurphy2005-11-061-0/+8
| | | | | | _maps added; demos adjusted TODO updated
* New helper module scheme, step 3murphy2005-11-055-4/+4
|
* New helper module scheme, step 2murphy2005-11-054-524/+0
|
* New helper module scheme, step 1murphy2005-11-054-0/+524
|
* HTML Encoder Documentation updated (:list style)murphy2005-11-041-1/+1
|
* HTML highlighting:murphy2005-11-043-85/+126
| | | | | | | | | | | | | | | | | | html_css.rb: Bugfixes CSS style scanning went for wrong range moved some styles into the right place html_output.rb: numerization excluded templates renamed new LIST template html_numerization.rb (new): new :line_numbers style :list (beta) Benchmarking: Split Options into lines :list style for testing
* Version 0.4.6!murphy2005-10-291-2/+12
| | | | | | | | coderay.rb: Added highlight functions new demo/demo_highlight.rb encoders/helpers/html_output.rb: Improved stylesheet method Rakefile: smarter progress info on uploading
* encoders/html.rb: Improved Info hints; better error messages; fixed tab bug!murphy2005-10-291-5/+8
| | | | test/ruby: added new targets
* encoders/html.rb: Fixed documentation. (woah, RDoc!)murphy2005-10-291-16/+36
|
* encoder.rb: Added Encoder#file_extensionmurphy2005-10-293-19/+78
| | | | | | | | | plugin.rb: #load_plugin --> #load; no more debug messages encoders/html.rb: Documentation; hint system; moved NUMERIZABLE_WRAPPINGS to html_output.rb encoders/helpers/html_output.rb: made stylesheet a method; disabled code cell hint; fixed inline numerizing encoders/debug.rb: changed extension to 'raydebug' etc folder added included etc/raydebug.vim for cool vim highlighting
* scanners/ruby.rb: fixed string inline codemurphy2005-10-163-7/+8
| | | | | 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-043-10/+123
| | | | | | | | | | | | | | | | 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
* demo/coderay_demos.tar.gz: demos in a tgzmurphy2005-10-021-3/+9
| | | | | encoders/null.rb: speeded up by hardcoding to_proc.
* Demos updated, rewritten, enhanced, tested.murphy2005-10-015-35/+44
| | | | | | | | | | | | | | | | | 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.
* Some demos updated.murphy2005-10-014-56/+33
| | | | Massive changes for HTML output layout.
* html_output.rb changed for silly rdoc, second try.no author2005-09-261-1/+1
|
* html_output.rb changed for silly old rdocno author2005-09-261-1/+1
| | | | Rakefile and configs added
* New Repository, initial importno author2005-09-2612-0/+886