dp.SyntaxHighlighter 1.5.2 Tests and Samples

http://code.google.com/p/syntaxhighlighter/

JavaScript

Languages:

  1. C#
  2. CSS
  3. C++
  4. Delphi
  5. Java
  6. JavaScript
  7. PHP
  8. Python
  9. Ruby
  10. SQL
  11. Visual Basic
  12. XML / HTML
  13. Scala
  14. Groovy
  15. Bash

Features:

  1. Smart tabs
  2. First line
  3. Expand code
  4. Show columns
  5. Blogger integration
  6. No gutter
  7. No controls

Issues:

  1. #7, XSL transformation
  2. #15, Incorrect single quote
  3. #10, VB crash
  4. #19, No matches
Block before.
/* Test case for issue #15 (http://code.google.com/p/syntaxhighlighter/issues/detail?id=15) */
// This comment has a ' character.
line_ok();
a_string = 'hello';
line_bad();
// This comment has a ' character.
/* end */

/***********************************
 ** Multiline block comments
 **********************************/

// Hang test à partir de l`idagence / id type publication ``````

var stringWithUrl1 = "http://blog.dreamprojections.com";
var stringWithUrl2 = 'http://www.dreamprojections.com';

// callback for the match sorting
dpSyntaxHighlighter.prototype.SortCallback = function(m1, m2)
{
	// sort matches by index first
	if(m1.index < m2.index)
		return -1;
	else if(m1.index > m2.index)
		return 1;
	else
	{
		/*
		// if index is the same, sort by length
		if(m1.length < m2.length)
			return -1;
		else if(m1.length > m2.length)
			return 1;
		*/
	}
	
	alert('hello // world');
	return 0;
}
Block after.