diff options
author | murphy <murphy@rubychan.de> | 2008-09-30 16:42:53 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2008-09-30 16:42:53 +0000 |
commit | a4bd413ca4e835fd3d1fdc24eebce67cd54231ca (patch) | |
tree | 518d0448cec8093f2f2be22a483535fc642de975 /test/scanners/diff/example.expected.raydebug | |
parent | a1465d8bdf5637893c079d3a266b46b04e40d364 (diff) | |
download | coderay-a4bd413ca4e835fd3d1fdc24eebce67cd54231ca.tar.gz |
New: *Simple Diff Scanner* (closes #22).
* 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.
Diffstat (limited to 'test/scanners/diff/example.expected.raydebug')
-rw-r--r-- | test/scanners/diff/example.expected.raydebug | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/scanners/diff/example.expected.raydebug b/test/scanners/diff/example.expected.raydebug new file mode 100644 index 0000000..3e836fa --- /dev/null +++ b/test/scanners/diff/example.expected.raydebug @@ -0,0 +1,27 @@ +head[head(===================================================================)] +head[head(--- )plain(/Users/jgoebel/rails/pastie/app/controllers/pastes_controller.rb (revision 1431\))] +head[head(+++ )plain(/Users/jgoebel/rails/pastie/app/controllers/pastes_controller.rb (revision 1437\))] +change[change(@@)plain( -1,6 +1,10 )change(@@)] +insert[insert(+)plain(require 'login_system')] +comment( require 'coderay') +comment( ) +comment( class PastesController < ApplicationController) +insert[insert(+)plain( include LoginSystem)] +insert[insert(+)] +insert[insert(+)plain( before_filter :attempt_cookie_login)] +comment( ) +comment( # caches_action :recent) +comment( ) +change[change(@@)plain( -10,11 +14,7 )change(@@)] +comment( ) +comment( def show) +comment( @paste = Paste.find(params[:id]\)) +delete[delete(-)plain( if params[:key] and params[:key]==User.new(@paste.nick\).magic_mojo)] +delete[delete(-)plain( session[:login]=@paste.nick)] +delete[delete(-)plain( return redirect_to(:action => 'show', :id => @paste.id\))] +delete[delete(-)plain( end)] +delete[delete(-)plain( )] +insert[insert(+)plain( attempt_key_login if not logged_in?)] +comment( unless @paste.asset or not @paste.body.blank?) +comment( render :action => "edit") +comment( end)
\ No newline at end of file |