summaryrefslogtreecommitdiff
path: root/lib/coderay/helpers/plugin.rb
Commit message (Collapse)AuthorAgeFilesLines
* Removing redundant LoadError raise. File.exists? seems to have problems when ↵Will Read2012-04-011-1/+0
| | | | included in other gems and returns false when files are indeed present.
* Major rewrite of encoders to support IO output; fixed some minor scanner ↵Kornelius Kalnbach2011-08-191-5/+7
| | | | bugs; cleanups; dropped NitroXHTML scanner; improved tests
* minor support fixes for some Ruby engines and versionsmurphy2011-07-081-1/+1
|
* coderay list subcommand and cleanups/fixes in Plugin helper (issue #45)murphy2011-06-251-15/+25
|
* various fixes and cleanups in CodeRay's helpersmurphy2011-05-211-17/+9
|
* Cleanups, fixes and enhancements for the helper classes.murphy2011-02-281-144/+42
|
* Added all_plugins and all_titles methods to Plugin.murphy2010-07-051-0/+15
|
* Plugin: Added PluginHost#const_missing for plugin autoloading, fixed and ↵murphy2010-06-291-313/+330
| | | | improved documentation, re-indented everything.
* Improved behavior of Plugin#register_for.murphy2010-05-011-2/+3
|
* Plugin depends on -w instead of -d for warnings.murphy2010-03-261-1/+1
|
* Documentation.murphy2009-12-301-2/+4
|
* Fixing Ruby 1.9 warnings.murphy2009-10-181-2/+2
|
* New: Plugin.title (closes #96)murphy2009-06-091-0/+8
| | | | | | | The title saves the real name for a language, like "C++"...something that can't be deduced from the class name. And a version fix in the README.
* Removed subversion $Id$ lines.murphy2009-02-201-2/+0
|
* Plugin.helper can be used to load helpers from other plugins using the ↵murphy2009-01-131-1/+9
| | | | 'plugin/helper' syntax.
* Made plugin ids case-insensitive.murphy2009-01-011-1/+1
| | | | | With this change, upper case lang names are allowed like 'C'.
* New: *Java Scanner* (closes #42).murphy2008-09-211-3/+7
| | | | | | | | | | | | | | | | | | | * 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)
* Lib:murphy2008-01-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* Done:murphy2007-01-011-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 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.
* Tests:murphy2006-10-151-326/+326
| | | | | | | | | | | | | | | | - 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!)
* Changed error handling of all scanners: :error tokens are OK now, even in ↵murphy2006-07-111-9/+9
| | | | | | | | | | | | | 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-101-296/+296
|
* Fix:murphy2006-06-281-1/+1
| | | | | | | | | | | | | | HTML Scanner: Fixed a nasty bug with invalid entities. Thanks to Daniel Bovensiepen. Scanner: added Scanner.normify. Plugin: small documentation fix. Code statistic: added lib root folder rake_helpers/code_statistics.rb: added ability to include non-Ruby code in the statistics used it to count the mountain of test data There is some mixed space/tab indentation now. Complete 2-space-re-indentation will follow.
* new version: 0.7.1murphy2006-05-111-1/+1
| | | | | | | improved bin/coderay and included it into package added gem:install task added Duo#highlight (alias for encode) fixed a Plugin bug
* New Version: 0.7.0!murphy2006-04-191-11/+11
| | | | | | | | | | | Adjusted gem.rake. HTML scanner fixed. Enhanced filetype.rb: .rake files, xml, yaml (preparing for YAML scanner.) Enhanced test/ruby/1.in.rb. Added XML scanner with example. plugin.rb: made all_plugin_names public.
* Large update: Scanners for HTML, RHTML and Nitro-XHTML added.murphy2006-04-101-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* plugin.rb: _map loading now without exceptions (doesn't produce rubygem ↵murphy2006-02-201-4/+5
| | | | | | warnings) test/ruby/quotes: second test case added
* Plugin documentation updated.murphy2005-12-131-0/+11
|
* scanners/ruby/patterns.rb:murphy2005-12-111-1/+1
| | | | | | | | Changed recognition of numerics + and - prefixes now belong to the number. tests and demos adjusted. helpers/plugin.rb: Typo in doc.
* Plugin System extended:murphy2005-12-101-55/+17
| | | | | | | | | | - 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-051-2/+2
| | | | | Fixes in the coderay_rdoc_template.
* plugin.rb cleanupmurphy2005-11-101-75/+82
| | | | | ROADMAP and TODO updated
* helpers/plugin.rb: New plugin mapping systemmurphy2005-11-061-2/+36
| | | | | | _maps added; demos adjusted TODO updated
* bench/bench.rb: Added SilverCity benchmarkingmurphy2005-11-051-1/+10
| | | | | | | | | | | | | | | | | demo/demo_load_encoder.rb enhanced demo/demo_load_scanner.rb added .outs added plugin.rb: Fixed load_all encoder.rb, scanner.rb adjusted helpers/word_list.rb: Fixed a bug in CaseIgnoringWordList.new TODO: Updated new ROADMAP coderay.rb: increased Version number added Version System documentation
* encoder.rb: Added Encoder#file_extensionmurphy2005-10-291-3/+3
| | | | | | | | | 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
* Two new encoders: debug and xml.murphy2005-10-041-2/+2
| | | | | | | | | | | | | | | | 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
* Demos updated, rewritten, enhanced, tested.murphy2005-10-011-110/+109
| | | | | | | | | | | | | | | | | 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.
* After merge with Plugin branch.murphy2005-09-291-0/+287