view release on metacpan or search on metacpan
cp/codepress/codepress.css view on Meta::CPAN
white-space:pre;
background-image:url("images/line-numbers.png");
background-repeat:repeat-y;
background-position:0 3px;
line-height:16px;
height:100%;
}
pre {margin:0;}
html>body{background-position:0 2px;}
P {margin:0;padding:0;border:0;outline:0;display:block;white-space:pre;}
b, i, s, u, a, em, tt, ins, big, cite, strong, var, dfn {text-decoration:none;font-weight:normal;font-style:normal;font-size:13px;}
body.hide-line-numbers {background:white;margin-left:16px;}
body.show-line-numbers {background-image:url("images/line-numbers.png");margin-left:32px;}
cp/codepress/codepress.html view on Meta::CPAN
var ts = (new Date).getTime(); // timestamp to avoid cache
var lh = location.href;
if(ua.match('MSIE')) engine = 'msie';
else if(ua.match('KHTML')) engine = 'khtml';
else if(ua.match('Opera')) engine = 'opera';
else if(ua.match('Gecko')) engine = 'gecko';
if(lh.match('language=')) language = lh.replace(/.*language=(.*?)(&.*)?$/,'$1');
document.write('<link type="text/css" href="codepress.css?ts='+ts+'" rel="stylesheet" />');
document.write('<link type="text/css" href="languages/'+language+'.css?ts='+ts+'" rel="stylesheet" id="cp-lang-style" />');
document.write('<scr'+'ipt type="text/javascript" src="engines/'+engine+'.js?ts='+ts+'"></scr'+'ipt>');
document.write('<scr'+'ipt type="text/javascript" src="languages/'+language+'.js?ts='+ts+'"></scr'+'ipt>');
</script>
</head>
<script type="text/javascript">
if(engine == "msie" || engine == "gecko") document.write('<body><pre> </pre></body>');
else if(engine == "opera") document.write('<body></body>');
// else if(engine == "khtml") document.write('<body> </body>');
cp/codepress/codepress.js view on Meta::CPAN
* This program is free software; you can redistribute it and/or modify it under the terms of the
* GNU Lesser General Public License as published by the Free Software Foundation.
*
* Read the full licence: http://www.opensource.org/licenses/lgpl-license.php
*/
CodePress = function(obj) {
var self = document.createElement('iframe');
self.textarea = obj;
self.textarea.disabled = true;
self.textarea.style.overflow = 'hidden';
self.style.height = self.textarea.clientHeight +'px';
self.style.width = self.textarea.clientWidth +'px';
self.textarea.style.overflow = 'auto';
self.style.border = '1px solid gray';
self.frameBorder = 0; // remove IE internal iframe border
self.style.visibility = 'hidden';
self.style.position = 'absolute';
self.options = self.textarea.className;
self.initialize = function() {
self.editor = self.contentWindow.CodePress;
self.editor.body = self.contentWindow.document.getElementsByTagName('body')[0];
self.editor.setCode(self.textarea.value);
self.setOptions();
self.editor.syntaxHighlight('init');
self.textarea.style.display = 'none';
self.style.position = 'static';
self.style.visibility = 'visible';
self.style.display = 'inline';
}
// obj can by a textarea id or a string (code)
self.edit = function(obj,language) {
if(obj) self.textarea.value = document.getElementById(obj) ? document.getElementById(obj).value : obj;
if(!self.textarea.disabled) return;
self.language = language ? language : self.getLanguage();
self.src = CodePress.path+'codepress.html?language='+self.language+'&ts='+(new Date).getTime();
if(self.attachEvent) self.attachEvent('onload',self.initialize);
else self.addEventListener('load',self.initialize,false);
cp/codepress/codepress.js view on Meta::CPAN
self.setCode = function(code) {
self.textarea.disabled ? self.editor.setCode(code) : self.textarea.value = code;
}
self.toggleAutoComplete = function() {
self.editor.autocomplete = (self.editor.autocomplete) ? false : true;
}
self.toggleReadOnly = function() {
self.textarea.readOnly = (self.textarea.readOnly) ? false : true;
if(self.style.display != 'none') // prevent exception on FF + iframe with display:none
self.editor.readOnly(self.textarea.readOnly ? true : false);
}
self.toggleLineNumbers = function() {
var cn = self.editor.body.className;
self.editor.body.className = (cn==''||cn=='show-line-numbers') ? 'hide-line-numbers' : 'show-line-numbers';
}
self.toggleEditor = function() {
if(self.textarea.disabled) {
self.textarea.value = self.getCode();
self.textarea.disabled = false;
self.style.display = 'none';
self.textarea.style.display = 'inline';
}
else {
self.textarea.disabled = true;
self.setCode(self.textarea.value);
self.editor.syntaxHighlight('init');
self.style.display = 'inline';
self.textarea.style.display = 'none';
}
}
self.edit();
return self;
}
CodePress.languages = {
csharp : 'C#',
css : 'CSS',
cp/codepress/index.html view on Meta::CPAN
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>CodePress - Real Time Syntax Highlighting Editor written in JavaScript</title>
<style>
body {color:#000;background-color:white;font:15px georgia, "Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif; letter-spacing:0.01em;margin:15px;}
p {margin:0 0 15px 0;}
a,a:visited {color:#7f0055;}
select {background:#ffffe1;}
button {margin-top:5px;}
button.actions {width:171px;font-family:arial;}
h1 {color:#7f0055;margin:0;padding:0;font-size:42px;font-weight:normal;}
h1 a {text-decoration:none;}
h2 {margin:0;}
h2 a {text-decoration:none;font-weight:normal;font-size:22px;color:black !important;}
cp/codepress/index.html view on Meta::CPAN
#logo {text-align:center;background-color:#d6d6d6;padding:10px;-moz-border-radius:5px;border:1px solid silver;}
#container {width:700px;margin:20px auto;padding:25px;border:3px solid #d9d9d9;-moz-border-radius:10px;background:#f8f8f8;}
#languages {margin:5px 0;}
#menu {width:100%;background:#7f0055;-moz-border-radius:4px;}
#menu a {font:bold 17px georgia;color:white;padding:4px;display:block;border-left:1px solid white;text-align:center;text-decoration:none;}
#menu a:hover {background:#b9669e;}
.hidden-code {display:none;}
.copycode {border:1px dotted gray;padding:10px;background:white;font-family:monospace;color:gray}
</style>
</head>
<body>
<div id="container">
<div id="logo">
<h1><a href="http://codepress.org/">CodePress</a></h1>
<h2><a href="http://codepress.org/">Online Real Time Syntax Highlighting Editor</a></h2>
</div>
cp/codepress/index.html view on Meta::CPAN
<em>choose example in:</em>
<button onclick="cp1.edit('cp-php','php')">PHP</button>
<button onclick="cp1.edit('cp-javascript','javascript')">JavaScript</button>
<button onclick="cp1.edit('cp-java','java')">Java</button>
<button onclick="cp1.edit('cp-perl','perl')">Perl</button>
<button onclick="cp1.edit('cp-sql','sql')">SQL</button>
<button onclick="cp1.edit('cp-html','html')">HTML</button>
<button onclick="cp1.edit('cp-css','css')">CSS</button>
</div>
<textarea id="cp1" class="codepress php" style="width:700px;height:300px;" wrap="off">
<?php
// Very simple implementation of server side script
if(isset($_GET['file'])) {
$file = basename($_GET['file']);
$full_file = $path['server'].'/'.$path['webdocs'].'/'.$path['files']."/".$file;
if(file_exists($full_file)) {
$code = file_get_contents($full_file);
$code = preg_replace("/>/","&gt;",$code);
$code = preg_replace("/</","&lt;",$code);
$language = getLanguage($file);
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>CodePress - Real Time Syntax Highlighting Editor written in JavaScript</title>
<link type="text/css" href="languages/codepress-<?=$language?>.css" rel="stylesheet" id="cp-lang-style" />
<script type="text/javascript" src="codepress.js"></script>
<script type="text/javascript">
CodePress.language = '<?=$language?>';
</script>
</head>
<body id="ffedt"><pre id="ieedt"><?=$code?></pre></body>
</html>
</textarea>
<br /><br />
<textarea id="codepress2" class="codepress javascript linenumbers-off" style="width:700px;height:200px;" wrap="off">
//set language
this.setLanguage = function() {
if(arguments[0]) {
language = (typeof(Content.languages[arguments[0]])!='undefined') ? arguments[0] : this.setLanguage();
cpLanguage.innerHTML = Content.languages[language].name;
if(cpBody.document.designMode=='on') cpBody.document.designMode = 'off';
CodePress.loadScript(cpBody.document, '../languages/'+language+'.js', function () { cpBody.CodePress.syntaxHighlight('init'); })
cpBody.document.getElementById('cp-lang-style').href = '../languages/'+language+'.css';
this.hideMenu();
}
else {
var extension = filename.replace(/.*\.([^\.]+)$/,'$1');
var aux = false;
for(lang in Content.languages) {
extensions = ','+Content.languages[lang].extensions+',';
if(extensions.match(','+extension+',')) aux = lang;
}
language = (aux) ? aux : 'generic';
cp/codepress/index.html view on Meta::CPAN
$code = preg_replace("/</","&lt;",$code);
$language = getLanguage($file);
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>CodePress - Real Time Syntax Highlighting Editor written in JavaScript</title>
<link type="text/css" href="languages/codepress-<?=$language?>.css" rel="stylesheet" id="cp-lang-style" />
<script type="text/javascript" src="codepress.js"></script>
<script type="text/javascript">
CodePress.language = '<?=$language?>';
</script>
</head>
<body id="ffedt"><pre id="ieedt"><?=$code?></pre></body>
</html>
</textarea>
<textarea id="cp-javascript" class="hidden-code">
CodePress = function(obj) {
var self = document.createElement('iframe');
self.textarea = obj;
self.textarea.disabled = true;
self.style.height = self.textarea.clientHeight +'px';
self.style.width = self.textarea.clientWidth +'px';
self.initialize = function() {
self.editor = self.contentWindow.CodePress;
self.editor.body = self.contentWindow.document.getElementsByTagName('body')[0];
self.editor.setCode(self.textarea.value);
self.editor.syntaxHighlight('init');
}
self.edit = function(id,language) {
self.language = (language) ? language : self.textarea.className.replace(/ ?codepress ?/,'');
cp/codepress/index.html view on Meta::CPAN
BEGIN WORK;
UPDATE inventory SET quantity = quantity - 3 WHERE item = 'pants';
COMMIT;
</textarea>
<textarea id="cp-html" class="hidden-code">
<html>
<head>
<title>CodePress - Online Real Time Syntax Highlighting Editor</title>
<style type="text/css">
@import url(styles.css);
</style>
<script type="text/javascript">
function getCode() {
alert(textWithoutHighlighting);
}
</script>
</head>
<body>
<div id="logo">
<h1><a href="http://codepress.org/">CodePress</a></h1>
<h2>Online Real Time Syntax Highlighting Editor</h2>
cp/codepress/languages/asp.css view on Meta::CPAN
/*
* CodePress color styles for ASP-VB syntax highlighting
* By Martin D. Kirk
*/
/* tags */
b {
color:#000080;
}
/* comments */
big, big b, big em, big ins, big s, strong i, strong i b, strong i s, strong i u, strong i a, strong i a u, strong i s u {
color:gray;
cp/codepress/languages/asp.css view on Meta::CPAN
color:#FF0000;
}
/* ASP Language */
span{
color:#990000;
font-weight:bold;
}
strong i,strong a i, strong u i {
color:#009999;
}
/* style */
em {
color:#800080;
font-style:normal;
}
/* script */
ins {
color:#800000;
font-weight:bold;
}
/* <?php and ?> */
cite, s cite {
color:red;
cp/codepress/languages/asp.js view on Meta::CPAN
/*
* CodePress regular expressions for ASP-vbscript syntax highlighting
*/
// ASP VBScript
Language.syntax = [
// all tags
{ input : /(<[^!%|!%@]*?>)/g, output : '<b>$1</b>' },
// style tags
{ input : /(<style.*?>)(.*?)(<\/style>)/g, output : '<em>$1</em><em>$2</em><em>$3</em>' },
// script tags
{ input : /(<script.*?>)(.*?)(<\/script>)/g, output : '<ins>$1</ins><ins>$2</ins><ins>$3</ins>' },
// strings "" and attributes
{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' },
// ASP Comment
{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<dfn>\'$1$2</dfn>'},
// <%.*
{ input : /(<%)/g, output : '<strong>$1' },
// .*%>
{ input : /(%>)/g, output : '$1</strong>' },
cp/codepress/languages/autoit.css view on Meta::CPAN
/**
* CodePress color styles for AutoIt syntax highlighting
*/
u {font-style:normal;color:#000090;font-weight:bold;font-family:Monospace;}
var {color:#AA0000;font-weight:bold;font-style:normal;}
em {color:#FF33FF;}
ins {color:#AC00A9;}
i {color:#F000FF;}
b {color:#FF0000;}
a {color:#0080FF;font-weight:bold;}
s, s u, s b {color:#9999CC;font-weight:normal;}
cite, cite *{color:#009933;font-weight:normal;}
cp/codepress/languages/csharp.css view on Meta::CPAN
/*
* CodePress color styles for Java syntax highlighting
* By Edwin de Jonge
*/
b {color:#7F0055;font-weight:bold;font-style:normal;} /* reserved words */
a {color:#2A0088;font-weight:bold;font-style:normal;} /* types */
i, i b, i s {color:#3F7F5F;font-weight:bold;} /* comments */
s, s b {color:#2A00FF;font-weight:normal;} /* strings */
cp/codepress/languages/css.css view on Meta::CPAN
/*
* CodePress color styles for CSS syntax highlighting
*/
b, b a, b u {color:#000080;} /* tags, ids, classes */
i, i b, i s, i a, i u {color:gray;} /* comments */
s, s b {color:#a0a0dd;} /* parameters */
a {color:#0000ff;} /* keys */
u {color:red;} /* values */
cp/codepress/languages/generic.css view on Meta::CPAN
/*
* CodePress color styles for generic syntax highlighting
*/
b {color:#7F0055;font-weight:bold;} /* reserved words */
u {color:darkblue;font-weight:bold;} /* special words */
i, i b, i s, i u, i em {color:green;font-weight:normal;} /* comments */
s, s b, s em {color:#2A00FF;font-weight:normal;} /* strings */
em {font-weight:bold;} /* special chars */
cp/codepress/languages/html.css view on Meta::CPAN
/*
* CodePress color styles for HTML syntax highlighting
*/
b {color:#000080;} /* tags */
ins, ins b, ins s, ins em {color:gray;} /* comments */
s, s b {color:#7777e4;} /* attribute values */
a {color:green;} /* links */
u {color:#E67300;} /* forms */
big {color:#db0000;} /* images */
em, em b {color:#800080;} /* style */
strong {color:#800000;} /* script */
tt i {color:darkblue;font-weight:bold;} /* script reserved words */
cp/codepress/languages/html.js view on Meta::CPAN
/*
* CodePress regular expressions for HTML syntax highlighting
*/
// HTML
Language.syntax = [
{ input : /(<[^!]*?>)/g, output : '<b>$1</b>' }, // all tags
{ input : /(<a .*?>|<\/a>)/g, output : '<a>$1</a>' }, // links
{ input : /(<img .*?>)/g, output : '<big>$1</big>' }, // images
{ input : /(<\/?(button|textarea|form|input|select|option|label).*?>)/g, output : '<u>$1</u>' }, // forms
{ input : /(<style.*?>)(.*?)(<\/style>)/g, output : '<em>$1</em><em>$2</em><em>$3</em>' }, // style tags
{ input : /(<script.*?>)(.*?)(<\/script>)/g, output : '<strong>$1</strong><tt>$2</tt><strong>$3</strong>' }, // script tags
{ input : /=(".*?")/g, output : '=<s>$1</s>' }, // atributes double quote
{ input : /=('.*?')/g, output : '=<s>$1</s>' }, // atributes single quote
{ input : /(<!--.*?-->.)/g, output : '<ins>$1</ins>' }, // 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 : '<i>$1</i>' } // script reserved words
]
Language.snippets = [
{ input : 'aref', output : '<a href="$0"></a>' },
{ input : 'h1', output : '<h1>$0</h1>' },
cp/codepress/languages/html.js view on Meta::CPAN
{ input : 'h3', output : '<h3>$0</h3>' },
{ input : 'h4', output : '<h4>$0</h4>' },
{ input : 'h5', output : '<h5>$0</h5>' },
{ input : 'h6', output : '<h6>$0</h6>' },
{ input : 'html', output : '<html>\n\t$0\n</html>' },
{ input : 'head', output : '<head>\n\t<meta http-equiv="content-type" content="text/html; charset=utf-8" />\n\t<title>$0</title>\n\t\n</head>' },
{ input : 'img', output : '<img src="$0" alt="" />' },
{ input : 'input', output : '<input name="$0" id="" type="" value="" />' },
{ input : 'label', output : '<label for="$0"></label>' },
{ input : 'legend', output : '<legend>\n\t$0\n</legend>' },
{ input : 'link', output : '<link rel="stylesheet" href="$0" type="text/css" media="screen" charset="utf-8" />' },
{ input : 'base', output : '<base href="$0" />' },
{ input : 'body', output : '<body>\n\t$0\n</body>' },
{ input : 'css', output : '<link rel="stylesheet" href="$0" type="text/css" media="screen" charset="utf-8" />' },
{ input : 'div', output : '<div>\n\t$0\n</div>' },
{ input : 'divid', output : '<div id="$0">\n\t\n</div>' },
{ input : 'dl', output : '<dl>\n\t<dt>\n\t\t$0\n\t</dt>\n\t<dd></dd>\n</dl>' },
{ input : 'fieldset', output : '<fieldset>\n\t$0\n</fieldset>' },
{ input : 'form', output : '<form action="$0" method="" name="">\n\t\n</form>' },
{ input : 'meta', output : '<meta name="$0" content="" />' },
{ input : 'p', output : '<p>$0</p>' },
{ input : 'script', output : '<script type="text/javascript" language="javascript" charset="utf-8">\n\t$0\t\n</script>' },
{ input : 'scriptsrc', output : '<script src="$0" type="text/javascript" language="javascript" charset="utf-8"></script>' },
{ input : 'span', output : '<span>$0</span>' },
{ input : 'table', output : '<table border="$0" cellspacing="" cellpadding="">\n\t<tr><th></th></tr>\n\t<tr><td></td></tr>\n</table>' },
{ input : 'style', output : '<style type="text/css" media="screen">\n\t$0\n</style>' }
]
Language.complete = [
{ input : '\'',output : '\'$0\'' },
{ input : '"', output : '"$0"' },
{ input : '(', output : '\($0\)' },
{ input : '[', output : '\[$0\]' },
{ input : '{', output : '{\n\t$0\n}' }
]
cp/codepress/languages/java.css view on Meta::CPAN
/*
* CodePress color styles for Java syntax highlighting
*/
b {color:#7F0055;font-weight:bold;font-style:normal;} /* reserved words */
i, i b, i s {color:#3F7F5F;font-weight:bold;} /* comments */
s, s b {color:#2A00FF;font-weight:normal;} /* strings */
cp/codepress/languages/javascript.css view on Meta::CPAN
/*
* CodePress color styles for JavaScript syntax highlighting
*/
b {color:#7F0055;font-weight:bold;} /* reserved words */
u {color:darkblue;font-weight:bold;} /* special words */
i, i b, i s, i u {color:green;font-weight:normal;} /* comments */
s, s b, s u {color:#2A00FF;font-weight:normal;} /* strings */
cp/codepress/languages/perl.css view on Meta::CPAN
/*
* CodePress color styles for Perl syntax highlighting
* By J. Nick Koston
*/
b {color:#7F0055;font-weight:bold;} /* reserved words */
i, i b, i s, i em, i a, i u {color:gray;font-weight:normal;} /* comments */
s, s b, s a, s em, s u {color:#2A00FF;font-weight:normal;} /* strings */
a {color:#006700;font-weight:bold;} /* variables */
em {color:darkblue;font-weight:bold;} /* functions */
u {font-weight:bold;} /* special chars */
cp/codepress/languages/php.css view on Meta::CPAN
/*
* CodePress color styles for PHP syntax highlighting
*/
b {color:#000080;} /* tags */
big, big b, big em, big ins, big s, strong i, strong i b, strong i s, strong i u, strong i a, strong i a u, strong i s u {color:gray;font-weight:normal;} /* comments */
s, s b, strong s u, strong s cite {color:#5656fa;font-weight:normal;} /* attributes and strings */
strong a, strong a u {color:#006700;font-weight:bold;} /* variables */
em {color:#800080;font-style:normal;} /* style */
ins {color:#800000;} /* script */
strong u {color:#7F0055;font-weight:bold;} /* reserved words */
cite, s cite {color:red;font-weight:bold;} /* <?php and ?> */
cp/codepress/languages/php.js view on Meta::CPAN
/*
* CodePress regular expressions for PHP syntax highlighting
*/
// PHP
Language.syntax = [
{ input : /(<[^!\?]*?>)/g, output : '<b>$1</b>' }, // all tags
{ input : /(<style.*?>)(.*?)(<\/style>)/g, output : '<em>$1</em><em>$2</em><em>$3</em>' }, // style tags
{ input : /(<script.*?>)(.*?)(<\/script>)/g, output : '<ins>$1</ins><ins>$2</ins><ins>$3</ins>' }, // script tags
{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' }, // strings double quote
{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<s>\'$1$2</s>'}, // strings single quote
{ input : /(<\?)/g, output : '<strong>$1' }, // <?.*
{ input : /(\?>)/g, output : '$1</strong>' }, // .*?>
{ input : /(<\?php|<\?=|<\?|\?>)/g, output : '<cite>$1</cite>' }, // php tags
{ input : /(\$[\w\.]*)/g, output : '<a>$1</a>' }, // vars
{ input : /\b(false|true|and|or|xor|__FILE__|exception|__LINE__|array|as|break|case|class|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|for|foreach|function|globa...
{ input : /([^:])\/\/(.*?)(<br|<\/P)/g, output : '$1<i>//$2</i>$3' }, // php comments //
{ input : /([^:])#(.*?)(<br|<\/P)/g, output : '$1<i>#$2</i>$3' }, // php comments #
cp/codepress/languages/ruby.css view on Meta::CPAN
/*
* CodePress color styles for Ruby syntax highlighting
*/
b {color:#7F0055;font-weight:bold;} /* reserved words */
i, i b, i s, i em, i a, i u {color:gray;font-weight:normal;} /* comments */
s, s b, s a, s em, s u {color:#2A00FF;font-weight:normal;} /* strings */
a {color:#006700;font-weight:bold;} /* variables */
em {color:darkblue;font-weight:bold;} /* functions */
u {font-weight:bold;} /* special chars */
cp/codepress/languages/sql.css view on Meta::CPAN
/*
* CodePress color styles for SQL syntax highlighting
* By Merlin Moncure
*/
b {color:#0000FF;font-style:normal;font-weight:bold;} /* reserved words */
u {color:#FF0000;font-style:normal;} /* types */
a {color:#CD6600;font-style:normal;font-weight:bold;} /* commands */
i, i b, i u, i a, i s {color:#A9A9A9;font-weight:normal;font-style:italic;} /* comments */
s, s b, s u, s a, s i {color:#2A00FF;font-weight:normal;} /* strings */
cp/codepress/languages/text.css view on Meta::CPAN
/*
* CodePress color styles for Text syntax highlighting
*/
/* do nothing as expected */
cp/codepress/languages/vbscript.css view on Meta::CPAN
/*
* CodePress color styles for ASP-VB syntax highlighting
* By Martin D. Kirk
*/
/* tags */
b {
color:#000080;
}
/* comments */
big, big b, big em, big ins, big s, strong i, strong i b, strong i s, strong i u, strong i a, strong i a u, strong i s u {
color:gray;
cp/codepress/languages/vbscript.css view on Meta::CPAN
color:#FF0000;
}
/* ASP Language */
span{
color:#990000;
font-weight:bold;
}
strong i,strong a i, strong u i {
color:#009999;
}
/* style */
em {
color:#800080;
font-style:normal;
}
/* script */
ins {
color:#800000;
font-weight:bold;
}
/* <?php and ?> */
cite, s cite {
color:red;
cp/codepress/languages/vbscript.js view on Meta::CPAN
/*
* CodePress regular expressions for ASP-vbscript syntax highlighting
*/
// ASP VBScript
Language.syntax = [
// all tags
{ input : /(<[^!%|!%@]*?>)/g, output : '<b>$1</b>' },
// style tags
{ input : /(<style.*?>)(.*?)(<\/style>)/g, output : '<em>$1</em><em>$2</em><em>$3</em>' },
// script tags
{ input : /(<script.*?>)(.*?)(<\/script>)/g, output : '<ins>$1</ins><ins>$2</ins><ins>$3</ins>' },
// strings "" and attributes
{ input : /\"(.*?)(\"|<br>|<\/P>)/g, output : '<s>"$1$2</s>' },
// ASP Comment
{ input : /\'(.*?)(\'|<br>|<\/P>)/g, output : '<dfn>\'$1$2</dfn>'},
// <%.*
{ input : /(<%)/g, output : '<strong>$1' },
// .*%>
{ input : /(%>)/g, output : '$1</strong>' },
cp/codepress/languages/xsl.css view on Meta::CPAN
/*
* CodePress color styles for HTML syntax highlighting
* By RJ Bruneel
*/
b {color:#000080;} /* tags */
ins, ins b, ins s, ins em {color:gray;} /* comments */
s, s b {color:#7777e4;} /* attribute values */
a {color:#E67300;} /* links */
u {color:#CC66CC;} /* forms */
big {color:#db0000;} /* images */
em, em b {color:#800080;} /* style */
strong {color:#800000;} /* script */
tt i {color:darkblue;font-weight:bold;} /* script reserved words */
xsl {color:green;} /* xsl */
cp/codepress/languages/xsl.js view on Meta::CPAN
},{
input : /(<a.*?>|<\/a>)/g,
output : '<a>$1</a>' // links
},{
input : /(<img .*?>)/g,
output : '<big>$1</big>' // images
},{
input : /(<\/?(button|textarea|form|input|select|option|label).*?>)/g,
output : '<u>$1</u>' // forms
},{
input : /(<style.*?>)(.*?)(<\/style>)/g,
output : '<em>$1</em><em>$2</em><em>$3</em>' // style tags
},{
input : /(<script.*?>)(.*?)(<\/script>)/g,
output : '<strong>$1</strong><tt>$2</tt><strong>$3</strong>' // script tags
},{
input : /(<xsl.*?>|<\/xsl.*?>)/g,
output : '<xsl>$1</xsl>' // xsl
},{
input : /=(".*?")/g,
output : '=<s>$1</s>' // atributes double quote
},{
cp/codepress/languages/xsl.js view on Meta::CPAN
{input : 'h3', output : '<h3>$0</h3>' },
{input : 'h4', output : '<h4>$0</h4>' },
{input : 'h5', output : '<h5>$0</h5>' },
{input : 'h6', output : '<h6>$0</h6>' },
{input : 'html', output : '<html>\n\t$0\n</html>' },
{input : 'head', output : '<head>\n\t<meta http-equiv="content-type" content="text/html; charset=utf-8" />\n\t<title>$0</title>\n\t\n</head>' },
{input : 'img', output : '<img src="$0" width="" height="" alt="" border="0" />' },
{input : 'input', output : '<input name="$0" id="" type="" value="" />' },
{input : 'label', output : '<label for="$0"></label>' },
{input : 'legend', output : '<legend>\n\t$0\n</legend>' },
{input : 'link', output : '<link rel="stylesheet" href="$0" type="text/css" media="screen" charset="utf-8" />' },
{input : 'base', output : '<base href="$0" />' },
{input : 'body', output : '<body>\n\t$0\n</body>' },
{input : 'css', output : '<link rel="stylesheet" href="$0" type="text/css" media="screen" charset="utf-8" />' },
{input : 'div', output : '<div>\n\t$0\n</div>' },
{input : 'divid', output : '<div id="$0">\n\t\n</div>' },
{input : 'dl', output : '<dl>\n\t<dt>\n\t\t$0\n\t</dt>\n\t<dd></dd>\n</dl>' },
{input : 'fieldset', output : '<fieldset>\n\t$0\n</fieldset>' },
{input : 'form', output : '<form action="$0" method="" name="">\n\t\n</form>' },
{input : 'meta', output : '<meta name="$0" content="" />' },
{input : 'p', output : '<p>$0</p>' },
{input : 'b', output : '<b>$0</b>' },
{input : 'li', output : '<li>$0</li>' },
{input : 'ul', output : '<ul>$0</ul>' },
{input : 'ol', output : '<ol>$0</ol>' },
{input : 'strong', output : '<strong>$0</strong>' },
{input : 'br', output : '<br />' },
{input : 'script', output : '<script type="text/javascript" language="javascript" charset="utf-8">\n\t$0\t\n</script>' },
{input : 'scriptsrc', output : '<script src="$0" type="text/javascript" language="javascript" charset="utf-8"></script>' },
{input : 'span', output : '<span>$0</span>' },
{input : 'table', output : '<table border="$0" cellspacing="" cellpadding="">\n\t<tr><th></th></tr>\n\t<tr><td></td></tr>\n</table>' },
{input : 'style', output : '<style type="text/css" media="screen">\n\t$0\n</style>' },
{input : 'xsl:stylesheet', output : '<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">' },
{input : 'xsl:template', output : '<xsl:template>$0</xsl:template>' },
{input : 'xsl:for-each', output : '<xsl:for-each select="$0"></xsl:for-each>' },
{input : 'xsl:choose', output : '<xsl:choose>$0<\xsl:choose>' },
{input : 'xsl:param', output : '<xsl:param name="$0" />' },
{input : 'xsl:variable', output : '<xsl:variable name="$0"></xsl:variable>' },
{input : 'xsl:if', output : '<xsl:if test="$0"></xsl:if>' },
{input : 'xsl:when', output : '<xsl:when test="$0"></xsl:when>' },
{input : 'xsl:otherwise', output : '<xsl:otherwise>$0</xsl:otherwise>' },
{input : 'xsl:attribute', output : '<xsl:attribute name="$0"></xsl:attribute>' },
{input : 'xsl:value-of', output : '<xsl:value-of select="$0"/>' },
devel/curversion view on Meta::CPAN
use version;
use 5.006_001;
use FindBin qw($Bin);
use YAML::Syck;
use File::Spec;
use Getopt::LL qw(getoptions);
our $VERSION = 1.0;
my $options = getoptions(undef, { style => 'GNU' });
my $updir = File::Spec->updir();
my $distmeta = File::Spec->catfile($Bin, $updir, 'META.yml');
my $META = LoadFile($distmeta);
my $version = $META->{version};
if ($options->{'-n'}) {
my $v = version->new($version);
$version = $v->numify;