summaryrefslogtreecommitdiff
path: root/lib/coderay/encoders/html.rb
Commit message (Collapse)AuthorAgeFilesLines
* rename :independent_lines option to :break_linesKornelius Kalnbach2012-04-021-5/+6
|
* here come the white-space nazisKornelius Kalnbach2012-04-011-11/+12
|
* Fixed handling of eols inside token content.Etienne Massip2012-03-291-6/+10
|
* Extracted code making HTML lines independent from numbering code to a ↵Etienne Massip2012-01-261-4/+23
| | | | specific option in encoder.
* Bug #6: merge ConradIrwin's approach with korny'sKornelius Kalnbach2011-12-271-3/+3
|
* Remove assumption about a stable $:Conrad Irwin2011-12-231-3/+3
| | | | | | | | | | In some environments (e.g. [1]) $: can change between loading the library and using it. To avoid this problem, we always pass an absolute path to autoload internal modules. [1] https://github.com/pry/pry/issues/280
* pretty (longer) token class names; closes #347Kornelius Kalnbach2011-08-191-1/+0
|
* Major rewrite of encoders to support IO output; fixed some minor scanner ↵Kornelius Kalnbach2011-08-191-1/+11
| | | | bugs; cleanups; dropped NitroXHTML scanner; improved tests
* cleanups: Page encoder is default for HTML, benchmark KB/s instead of tokens/smurphy2011-07-041-1/+1
|
* #309 Improved highlighting of Ruby inside diffsmurphy2011-06-221-6/+6
|
* #299 fix transparent tokensmurphy2011-05-211-10/+8
|
* renamed pre_* token kinds to predefined_*murphy2011-04-171-7/+1
|
* Use autoload in HTML encoder; speedup for :css => :class mode.murphy2011-03-011-11/+17
|
* Code cleanups in HTML encoder.murphy2010-10-151-29/+24
|
* Fixed line token classes when using hints.murphy2010-09-221-1/+5
|
* Fix invalid HTML markup for line tokens (use span + CSS instead of div).murphy2010-09-221-3/+3
|
* Fixed HTML encoder :hint => info option.murphy2010-08-231-1/+1
|
* Use autoload instead of require (speeds up CodeRay startup) for CodeRay, ↵murphy2010-06-291-5/+9
| | | | Scanner, Tokens, and Encoders::HTML.
* More speedups for HTML encoding (numbering, CSS styles, Ruby 1.9).murphy2010-06-271-27/+11
|
* Trying out a simplified, faster method of HTML encoding.murphy2010-06-271-42/+41
|
* Cleanups in Encoders::HTML::Output.murphy2010-06-011-2/+2
|
* Fixed a problem with line tokens when using :hint => :debug in the HTML encoder.murphy2010-05-051-2/+2
|
* Got rid of the old streaming system (see #142).murphy2010-05-011-1/+0
|
* Direct Streaming! See #142 and Changes.textile.murphy2010-05-011-88/+83
|
* New HTML Encoder option :line_number_anchors (closes #208).murphy2010-04-021-1/+10
| | | | | Also removed the :list wrapping style, and made a lot of cleanup in the styles. See Changes.textile.
* Upporting changes from 0.9.2 (vs. 0.9.1).murphy2010-03-311-2/+2
|
* Use new :alpha style be default. This means IE will have problems with the ↵murphy2010-03-311-1/+1
| | | | colors.
* Renamed token_classes to token_kinds (closes #122).murphy2010-03-301-17/+18
| | | | | | | | | * *RENAMED* from ClassOfKind. The term "token class" is no longer used in CodeRay. Instead, tokens have _kinds_. * *RENAMED* TokenKindFilter to TokenClassFilter. * *ADDED* documentation on encoders affected by the term change. * *REMOVED* token kinds :attribute_name_fat, :attribute_value_fat, :operator_fat, :tag_fat, and :xml_text. * *ADDED* token kind :filename.
* Encoders::HTML#token's second parameter is no longer optional.murphy2010-01-061-1/+1
|
* Cleanup.murphy2010-01-011-1/+1
|
* Cleanup.murphy2009-12-301-2/+1
|
* Removed obsolete :level property from HTML Encoder.murphy2009-06-071-1/+1
| | | | | Thanks to Gavin for pointing that out.
* Added a :title option for the HTML Encoder. Closes #55.murphy2009-04-141-1/+8
|
* New feature: HTML encode option :highlight_lines. See documentation.murphy2009-01-221-0/+11
| | | | | | * The scanner test suite uses it and highlights the lines that differ after a failed complete test in *.actual.html.
* Fixes for Ruby 1.9.murphy2008-12-251-45/+46
|
* New: *Simple Diff Scanner* (closes #22).murphy2008-09-301-1/+26
| | | | | | | | | | | | | | * Highlights unified diffs, especially like the ones svn diff outputs. * Changes to make highlighting of whole lines were necessary. * I added two example files. More changes: * Added token classes :head, :delete, :insert, and :change along with styles. * Added two new special token types: :begin_line and :end_line. They mark token groups that explicitly span whole lines and should be highlighted as such. * The HTML encoder converts these new tokens to DIVs. May need more work. * The Debug Encoder uses square brackets for line tokens. * Some cleanups.
* Lib:murphy2008-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* - 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-241-1/+5
| | | | | | | 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-011-15/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
|
* 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-101-239/+239
|
* Encoders::HTML: Removed option caching.murphy2006-06-281-9/+1
|
* Large update: Scanners for HTML, RHTML and Nitro-XHTML added.murphy2006-04-101-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* CodeRay::Duo added for cool caching!murphy2006-03-211-8/+5
| | | | | | | | 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-151-13/+12
| | | | | Changed HTML::CSS.load_stylesheet behaviour.