All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.wicketstuff.jquery.codepress.languages.xsl.js Maven / Gradle / Ivy

/*
 * CodePress regular expressions for XSL syntax highlighting
 * By RJ Bruneel
 */

Language.syntax = [ // XSL
	{
	input : /(<[^!]*?>)/g,
	output : '$1' // all tags
	},{
	input : /(<a.*?>|<\/a>)/g,
	output : '$1' // links
	},{
	input : /(<img .*?>)/g,
	output : '$1' // images
	},{
	input : /(<\/?(button|textarea|form|input|select|option|label).*?>)/g,
	output : '$1' // forms
	},{
	input : /(<style.*?>)(.*?)(<\/style>)/g,
	output : '$1$2$3' // style tags
	},{
	input : /(<script.*?>)(.*?)(<\/script>)/g,
	output : '$1$2$3' // script tags
	},{	
	input : /(<xsl.*?>|<\/xsl.*?>)/g,
	output : '$1' // xsl
	},{
	input : /=(".*?")/g,
	output : '=$1' // atributes double quote
	},{
	input : /=('.*?')/g,
	output : '=$1' // atributes single quote
	},{
	input : /(<!--.*?-->.)/g,
	output : '$1' // comments 
	},{
	input : /\b(alert|window|document|break|continue|do|for|new|this|void|case|default|else|function|return|typeof|while|if|label|switch|var|with|catch|boolean|int|try|false|throws|null|true|goto)\b/g,
	output : '$1' // script reserved words
	}
];

Language.snippets = [
	{input : 'aref', output : '' },
	{input : 'h1', output : '

$0

' }, {input : 'h2', output : '

$0

' }, {input : 'h3', output : '

$0

' }, {input : 'h4', output : '

$0

' }, {input : 'h5', output : '
$0
' }, {input : 'h6', output : '
$0
' }, {input : 'html', output : '\n\t$0\n' }, {input : 'head', output : '\n\t\n\t$0\n\t\n' }, {input : 'img', output : '' }, {input : 'input', output : '' }, {input : 'label', output : '' }, {input : 'legend', output : '\n\t$0\n' }, {input : 'link', output : '' }, {input : 'base', output : '' }, {input : 'body', output : '\n\t$0\n' }, {input : 'css', output : '' }, {input : 'div', output : '
\n\t$0\n
' }, {input : 'divid', output : '
\n\t\n
' }, {input : 'dl', output : '
\n\t
\n\t\t$0\n\t
\n\t
\n
' }, {input : 'fieldset', output : '
\n\t$0\n
' }, {input : 'form', output : '
\n\t\n
' }, {input : 'meta', output : '' }, {input : 'p', output : '

$0

' }, {input : 'b', output : '$0' }, {input : 'li', output : '
  • $0
  • ' }, {input : 'ul', output : '
      $0
    ' }, {input : 'ol', output : '
      $0
    ' }, {input : 'strong', output : '$0' }, {input : 'br', output : '
    ' }, {input : 'script', output : '' }, {input : 'scriptsrc', output : '' }, {input : 'span', output : '$0' }, {input : 'table', output : '\n\t\n\t\n
    ' }, {input : 'style', output : '' }, {input : 'xsl:stylesheet', output : '' }, {input : 'xsl:template', output : '$0' }, {input : 'xsl:for-each', output : '' }, {input : 'xsl:choose', output : '$0<\xsl:choose>' }, {input : 'xsl:param', output : '' }, {input : 'xsl:variable', output : '' }, {input : 'xsl:if', output : '' }, {input : 'xsl:when', output : '' }, {input : 'xsl:otherwise', output : '$0' }, {input : 'xsl:attribute', output : '' }, {input : 'xsl:value-of', output : '' }, {input : 'xsl:with-param', output : '' }, {input : 'xsl:call-template', output : '' } ]; Language.complete = [ // Auto complete only for 1 character {input : '\'',output : '\'$0\'' }, {input : '"', output : '"$0"' }, {input : '(', output : '\($0\)' }, {input : '[', output : '\[$0\]' }, {input : '{', output : '{\n\t$0\n}' } ]; Language.shortcuts = [];




    © 2015 - 2025 Weber Informatics LLC | Privacy Policy