Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Added documentation and style changes #85

Closed
wants to merge 4 commits into from

2 participants

Dennis Reimann Craig Campbell
Dennis Reimann

I dug some time to find information on how to build the minified version, so afterwards I figured it'd be document how this can be done. I also separated themes and general layout concerns, because I think it makes sense to influence the design of code blocks (margin, padding, borders, ...) apart from the used theme.

Let me know what you think.

dennisreimann added some commits
Dennis Reimann dennisreimann add documentation on building
and allow a custom build script to be present but ignore it (build.sh)
44c4420
Dennis Reimann dennisreimann separate themes and general layout concerns
makes it easier to influence the design of code blocks apart from the used theme
ceb861e
Dennis Reimann dennisreimann Bump version number to 1.2.0 71acdd4
Dennis Reimann dennisreimann added xml highlighting dd4a00d
Craig Campbell
Owner

Hey sorry for not commenting on this before. I am all for adding the additional documentation about building, but I'm not crazy about breaking out the css.

I understand that from a code duplication standpoint it cuts down on the code, but I don't want to encourage people to include multiple stylesheets. The way I see it is each theme should be fully designed and work itself out of the box. It should be up to the author/designer exactly how that theme should look so the font-size/border-radius/padding should be up to the designer for that theme. The fact that they all include the same base styles is because everyone ended up copying and pasting from the first theme I created.

I want this library to be as simple as possible to use and I think that means including one javascript file (if custom built) and one css theme file. If you want to customize the base styles of the theme you can, of course, overwrite them by adding your own css after the theme css.

Dennis Reimann

Hey Craig, thanks for the comment.

If you want to customize the base styles of the theme you can, of course, overwrite them by adding your own css after the theme css.

That's exactly what I ended up with and it works fine for me.

Cheers,
Dennis

Craig Campbell ccampbell closed this in 83095f2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 16, 2012
  1. Dennis Reimann

    add documentation on building

    dennisreimann authored
    and allow a custom build script to be present but ignore it (build.sh)
  2. Dennis Reimann

    separate themes and general layout concerns

    dennisreimann authored
    makes it easier to influence the design of code blocks apart from the used theme
  3. Dennis Reimann
Commits on Oct 20, 2012
  1. Dennis Reimann

    added xml highlighting

    dennisreimann authored
This page is out of date. Refresh to see the latest.
Showing with 154 additions and 205 deletions.
  1. +1 −0  .gitignore
  2. +21 −0 README.md
  3. +8 −0 demos/_general.css
  4. +12 −11 demos/c.html
  5. +1 −0  demos/coffeescript.html
  6. +1 −0  demos/csharp.html
  7. +1 −0  demos/css.html
  8. +1 −0  demos/go.html
  9. +1 −0  demos/html.html
  10. +1 −0  demos/js.html
  11. +1 −0  demos/lua.html
  12. +1 −0  demos/php-long.html
  13. +1 −0  demos/php.html
  14. +1 −0  demos/python.html
  15. +5 −4 demos/r.html
  16. +1 −0  demos/ruby-test.html
  17. +5 −4 demos/ruby.html
  18. +1 −5 demos/scheme.html
  19. +1 −0  demos/shell.html
  20. +56 −0 js/language/xml.js
  21. +1 −1  js/rainbow.js
  22. +9 −8 js/rainbow.min.js
  23. +1 −11 themes/all-hallows-eve.css
  24. +1 −11 themes/blackboard.css
  25. +1 −11 themes/espresso-libre.css
  26. +1 −33 themes/github.css
  27. +1 −11 themes/obsidian.css
  28. +1 −13 themes/pastie.css
  29. +1 −11 themes/solarized-dark.css
  30. +1 −11 themes/solarized-light.css
  31. +11 −20 themes/sunburst.css
  32. +1 −10 themes/tomorrow-night.css
  33. +1 −8 themes/tricolore.css
  34. +1 −11 themes/twilight.css
  35. +1 −11 themes/zenburnesque.css
1  .gitignore
View
@@ -2,3 +2,4 @@
*.sw?
js/rainbow-custom.min.js
.AppleDouble
+build.sh
21 README.md
View
@@ -73,6 +73,27 @@ Currently supported languages are:
- Shell
- Smalltalk
+## Building
+
+Rainbow gets minified with the closure compiler. You can install it on OS X via Homebrew:
+
+ brew install closure-compiler
+
+To build a minified version of your changes, you can run the compile script:
+
+ util/compile.py --core
+
+In case the compiler cannot be found (which is the case if you installed via Homebrew),
+you will have to specify the path to the compiler.jar (see `brew info closure-compiler`) -
+here's an example:
+
+ CLOSURE_COMPILER=/usr/local/Cellar/closure-compiler/20120710/libexec/build/compiler.jar util/compile.py --core
+
+If you want to build a custom version, list the languages you would like to include as
+command line arguments:
+
+ util/compile.py ruby javascript
+
## More Info
If you are looking for line number support you can try https://github.com/Sjeiti/rainbow.linenumbers
8 demos/_general.css
View
@@ -0,0 +1,8 @@
+pre, code {
+ font: 14px/1.4 'Monaco', courier, monospace;
+}
+
+pre {
+ border-radius: 5px;
+ padding: 10px;
+}
23 demos/c.html
View
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>Syntax Highlighting</title>
+<link href="_general.css" rel="stylesheet" type="text/css" media="screen">
<link href="../themes/blackboard.css" rel="stylesheet" type="text/css" media="screen">
<body>
@@ -56,7 +57,7 @@
while ((opt = getopt(argc, argv, ":a")) != -1) {
switch (opt) {
- case 'a':
+ case 'a':
openFlags |= O_APPEND;
default:
die("Unrecognized option");
@@ -115,25 +116,25 @@
/* Dynamically enter types into table */
int type_find(const char* type) {
-
+
if (strlen(type) >= MAX_TYPE_LEN) {
error("Type name %s is too long to index into type table.", type);
}
if (type_index >= MAX_NUM_TYPES) {
error("Too many types in type table already. Cannot add %s.", type);
}
-
+
for (int i = 0; i &lt; type_index; i++) {
// Return type index if found
if (strcmp(type, type_table[i]) == 0) {
return i;
}
}
-
+
// If not found add to table and return
strcpy(type_table[type_index], type);
type_index++;
-
+
return type_index-1;
}
@@ -177,24 +178,24 @@
}
sound* wav_load_file(char* filename) {
-
+
sound* s = malloc(sizeof(sound));
-
+
SDL_AudioSpec spec;
-
+
if( SDL_LoadWAV(filename, &amp;spec, (Uint8**)&amp;s->data, (Uint32*)&amp;s->length) == NULL) {
error("Unable to load sound file %s", filename);
}
-
+
if ((spec.format != AUDIO_S16LSB) &amp;&amp;
(spec.format != AUDIO_S16MSB)) {
error("Unsupported sound format for file %s, id %i.", filename, spec.format);
}
-
+
if (spec.format != AUDIO_S16SYS) {
flip_endian(s-&gt;data, s-&gt;length);
}
-
+
return s;
}
1  demos/coffeescript.html
View
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>Syntax Highlighting</title>
+<link href="_general.css" rel="stylesheet" type="text/css" media="screen">
<link href="../themes/blackboard.css" rel="stylesheet" type="text/css" media="screen">
<body>
1  demos/csharp.html
View
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>Syntax Highlighting</title>
+<link href="_general.css" rel="stylesheet" type="text/css" media="screen">
<link href="../themes/obsidian.css" rel="stylesheet" type="text/css" media="screen">
<body>
1  demos/css.html
View
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>Syntax Highlighting</title>
+<link href="_general.css" rel="stylesheet" type="text/css" media="screen">
<link href="../themes/blackboard.css" rel="stylesheet" type="text/css" media="screen">
<body>
1  demos/go.html
View
@@ -4,6 +4,7 @@
-->
<meta charset=utf-8>
<title>Syntax Highlighting</title>
+<link href="_general.css" rel="stylesheet" type="text/css" media="screen">
<link href="../themes/blackboard.css" rel="stylesheet" type="text/css" media="screen">
<body>
<h3>GO language</h3>
1  demos/html.html
View
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>Syntax Highlighting</title>
+<link href="_general.css" rel="stylesheet" type="text/css" media="screen">
<link href="../themes/blackboard.css" rel="stylesheet" type="text/css" media="screen">
<body>
<style type="text/css">
1  demos/js.html
View
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>Syntax Highlighting</title>
+<link href="_general.css" rel="stylesheet" type="text/css" media="screen">
<link href="../themes/blackboard.css" rel="stylesheet" type="text/css" media="screen">
<body>
<pre>
1  demos/lua.html
View
@@ -4,6 +4,7 @@
-->
<meta charset=utf-8>
<title>Syntax Highlighting</title>
+<link href="_general.css" rel="stylesheet" type="text/css" media="screen">
<link href="../themes/blackboard.css" rel="stylesheet" type="text/css" media="screen">
<body>
1  demos/php-long.html
View
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>Syntax Highlighting</title>
+<link href="_general.css" rel="stylesheet" type="text/css" media="screen">
<link href="../themes/blackboard.css" rel="stylesheet" type="text/css" media="screen">
<body>
1  demos/php.html
View
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>Syntax Highlighting</title>
+<link href="_general.css" rel="stylesheet" type="text/css" media="screen">
<link href="../themes/blackboard.css" rel="stylesheet" type="text/css" media="screen">
<body>
1  demos/python.html
View
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>Syntax Highlighting</title>
+<link href="_general.css" rel="stylesheet" type="text/css" media="screen">
<link href="../themes/blackboard.css" rel="stylesheet" type="text/css" media="screen">
<body>
9 demos/r.html
View
@@ -2,6 +2,7 @@
<html>
<head>
<title>R Demo</title>
+ <link href="_general.css" rel="stylesheet" type="text/css" media="screen">
<link href="../themes/tomorrow-night.css" rel="stylesheet">
</head>
<body>
@@ -29,7 +30,7 @@
## Initialising result vector
pdfValues &lt;- rep(0, length(x))
-
+
## Because 'integrate' doesn't take vectors as input, we need to iterate over
## x to evaluate densities
for (i in 1:length(x)) {
@@ -41,14 +42,14 @@
complex(real = beta, imaginary = s))
result &lt;- result^rho ## Scaling result by rho
r &lt;- Mod(result)
- theta &lt;- Arg(result)
+ theta &lt;- Arg(result)
r * cos(theta - (s * x[i]))
}
-
+
## Integrating modified characteristic function
pdfValues[i] &lt;- (1 / pi) * integrate(chfn, 0, Inf)$value
}
-
+
## Returning vector of densities
pdfValues
}
1  demos/ruby-test.html
View
@@ -2,6 +2,7 @@
<html>
<head>
<title>Ruby Test</title>
+ <link href="_general.css" rel="stylesheet" type="text/css" media="screen">
<link href="../themes/blackboard.css" rel="stylesheet">
</head>
<body>
9 demos/ruby.html
View
@@ -2,26 +2,27 @@
<html>
<head>
<title>rack/directory.rb</title>
+ <link href="_general.css" rel="stylesheet" type="text/css" media="screen">
<link href="../themes/blackboard.css" rel="stylesheet">
</head>
<body>
<pre>
<code data-language="ruby"># Copyright (c) 2007, 2008, 2009, 2010 Christian Neukirchen &lt;purl.org/net/chneukirchen&gt;
-#
+#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the &quot;Software&quot;), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
-#
+#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
-#
+#
# THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
-# THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+# THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
6 demos/scheme.html
View
@@ -1,6 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html> <head>
<title>Syntax Highlighting</title>
+<link href="_general.css" rel="stylesheet" type="text/css" media="screen">
<link href="../themes/twilight.css" rel="stylesheet" type="text/css" media="screen">
</head>
@@ -38,11 +39,6 @@
</pre>
-
-<hr>
-<address></address>
-<!-- hhmts start -->Last modified: Wed Jan 25 22:04:37 CET 2012 <!-- hhmts end -->
-
<script src="../js/rainbow.js"></script>
<script src="../js/language/scheme.js"></script>
</body> </html>
1  demos/shell.html
View
@@ -2,6 +2,7 @@
<html>
<head>
<title>ruby-build</title>
+ <link href="_general.css" rel="stylesheet" type="text/css" media="screen">
<link href="../themes/blackboard.css" rel="stylesheet">
</head>
<body>
56 js/language/xml.js
View
@@ -0,0 +1,56 @@
+/**
+ * XML patterns
+ *
+ * @author Dennis Reimann
+ * @version 1.0.0
+ */
+Rainbow.extend('xml', [
+ {
+ 'name': 'comment.xml',
+ 'pattern': /&lt;\!--[\S\s]*?--&gt;/g
+ },
+ {
+ 'matches': {
+ 1: 'support.tag.open',
+ 2: 'support.tag.close'
+ },
+ 'pattern': /(&lt;)|(\/?\??&gt;)/g
+ },
+ {
+ 'name': 'support.tag',
+ 'matches': {
+ 1: 'support.tag',
+ 2: 'support.tag.special',
+ 3: 'support.tag-name'
+ },
+ 'pattern': /(&lt;\??)(\/|\!?)(\w+)/g
+ },
+ {
+ 'matches': {
+ 1: 'support.attribute'
+ },
+ 'pattern': /([a-z-]+)(?=\=)/g
+ },
+ {
+ 'matches': {
+ 1: 'support.operator',
+ 2: 'string.quote',
+ 3: 'string.value',
+ 4: 'string.quote'
+ },
+ 'pattern': /(=)('|")(.*?)(\2)/g
+ },
+ {
+ 'matches': {
+ 1: 'support.operator',
+ 2: 'support.value'
+ },
+ 'pattern': /(=)([a-zA-Z\-0-9]*)\b/g
+ },
+ {
+ 'matches': {
+ 1: 'support.attribute'
+ },
+ 'pattern': /\s(\w+)(?=\s|&gt;)(?![\s\S]*&lt;)/g
+ }
+], true);
2  js/rainbow.js
View
@@ -15,7 +15,7 @@
*
* Rainbow is a simple code syntax highlighter
*
- * @preserve @version 1.1.8
+ * @preserve @version 1.2.0
* @url rainbowco.de
*/
window['Rainbow'] = (function() {
17 js/rainbow.min.js
View
@@ -1,8 +1,9 @@
-/* Rainbow v1.1.8 rainbowco.de */
-window.Rainbow=function(){function q(a){var b,c=a.getAttribute&&a.getAttribute("data-language")||0;if(!c){a=a.attributes;for(b=0;b<a.length;++b)if("data-language"===a[b].nodeName)return a[b].nodeValue}return c}function B(a){var b=q(a)||q(a.parentNode);if(!b){var c=/\blang(?:uage)?-(\w+)/;(a=a.className.match(c)||a.parentNode.className.match(c))&&(b=a[1])}return b}function C(a,b){for(var c in e[d]){c=parseInt(c,10);if(a==c&&b==e[d][c]?0:a<=c&&b>=e[d][c])delete e[d][c],delete j[d][c];if(a>=c&&a<e[d][c]||
-b>c&&b<e[d][c])return!0}return!1}function r(a,b){return'<span class="'+a.replace(/\./g," ")+(l?" "+l:"")+'">'+b+"</span>"}function s(a,b,c,h){var f=a.exec(c);if(f){++t;!b.name&&"string"==typeof b.matches[0]&&(b.name=b.matches[0],delete b.matches[0]);var k=f[0],i=f.index,u=f[0].length+i,g=function(){function f(){s(a,b,c,h)}t%100>0?f():setTimeout(f,0)};if(C(i,u))g();else{var m=v(b.matches),l=function(a,c,h){if(a>=c.length)h(k);else{var d=f[c[a]];if(d){var e=b.matches[c[a]],i=e.language,g=e.name&&e.matches?
-e.matches:e,j=function(b,d,e){var i;i=0;var g;for(g=1;g<c[a];++g)f[g]&&(i=i+f[g].length);d=e?r(e,d):d;k=k.substr(0,i)+k.substr(i).replace(b,d);l(++a,c,h)};i?n(d,i,function(a){j(d,a)}):typeof e==="string"?j(d,d,e):w(d,g.length?g:[g],function(a){j(d,a,e.matches?e.name:0)})}else l(++a,c,h)}};l(0,m,function(a){b.name&&(a=r(b.name,a));if(!j[d]){j[d]={};e[d]={}}j[d][i]={replace:f[0],"with":a};e[d][i]=u;g()})}}else h()}function v(a){var b=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c);return b.sort(function(a,
-b){return b-a})}function w(a,b,c){function h(b,k){k<b.length?s(b[k].pattern,b[k],a,function(){h(b,++k)}):D(a,function(a){delete j[d];delete e[d];--d;c(a)})}++d;h(b,0)}function D(a,b){function c(a,b,h,e){if(h<b.length){++x;var g=b[h],l=j[d][g],a=a.substr(0,g)+a.substr(g).replace(l.replace,l["with"]),g=function(){c(a,b,++h,e)};0<x%250?g():setTimeout(g,0)}else e(a)}var h=v(j[d]);c(a,h,0,b)}function n(a,b,c){var d=m[b]||[],f=m[y]||[],b=z[b]?d:d.concat(f);w(a.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/&(?![\w\#]+;)/g,
-"&amp;"),b,c)}function o(a,b,c){if(b<a.length){var d=a[b],f=B(d);return!(-1<(" "+d.className+" ").indexOf(" rainbow "))&&f?(f=f.toLowerCase(),d.className+=d.className?" rainbow":"rainbow",n(d.innerHTML,f,function(k){d.innerHTML=k;j={};e={};p&&p(d,f);setTimeout(function(){o(a,++b,c)},0)})):o(a,++b,c)}c&&c()}function A(a,b){var a=a&&"function"==typeof a.getElementsByTagName?a:document,c=a.getElementsByTagName("pre"),d=a.getElementsByTagName("code"),f,e=[];for(f=0;f<d.length;++f)e.push(d[f]);for(f=0;f<
-c.length;++f)c[f].getElementsByTagName("code").length||e.push(c[f]);o(e,0,b)}var j={},e={},m={},z={},d=0,y=0,t=0,x=0,l,p;return{extend:function(a,b,c){1==arguments.length&&(b=a,a=y);z[a]=c;m[a]=b.concat(m[a]||[])},b:function(a){p=a},a:function(a){l=a},color:function(a,b,c){if("string"==typeof a)return n(a,b,c);if("function"==typeof a)return A(0,a);A(a,b)}}}();window.addEventListener?window.addEventListener("load",Rainbow.color,!1):window.attachEvent("onload",Rainbow.color);Rainbow.onHighlight=Rainbow.b;
-Rainbow.addClass=Rainbow.a;
+/* Rainbow v1.2.0 rainbowco.de */
+function h(a){var b,e=a.getAttribute&&a.getAttribute("data-language")||0;if(!e){a=a.attributes;for(b=0;b<a.length;++b)if("data-language"===a[b].nodeName)return a[b].nodeValue}return e}function l(a,b){return'<span class="'+a.replace(/\./g," ")+(m?" "+m:"")+'">'+b+"</span>"}
+function n(a,b,e,c){var d=a.exec(e);if(d){++o;!b.name&&"string"==typeof b.matches[0]&&(b.name=b.matches[0],delete b.matches[0]);var i=d[0],f=d.index,j=d[0].length+f,k=function(){function d(){n(a,b,e,c)}o%100>0?d():setTimeout(d,0)},g;a:{for(g in r[s]){g=parseInt(g,10);if(f==g&&j==r[s][g]?0:f<=g&&j>=r[s][g])delete r[s][g],delete t[s][g];if(f>=g&&f<r[s][g]||j>g&&j<r[s][g]){g=!0;break a}}g=!1}if(g)k();else{g=u(b.matches);var p=function(a,e,g){if(a>=e.length)g(i);else{var c=d[e[a]];if(c){var f=b.matches[e[a]],
+j=f.language,k=f.name&&f.matches?f.matches:f,q=function(b,c,f){var j=0,k;for(k=1;k<e[a];++k)d[k]&&(j=j+d[k].length);c=f?l(f,c):c;i=i.substr(0,j)+i.substr(j).replace(b,c);p(++a,e,g)};j?v(c,j,function(a){q(c,a)}):typeof f==="string"?q(c,c,f):w(c,k.length?k:[k],function(a){q(c,a,f.matches?f.name:0)})}else p(++a,e,g)}};p(0,g,function(a){b.name&&(a=l(b.name,a));if(!t[s]){t[s]={};r[s]={}}t[s][f]={replace:d[0],"with":a};r[s][f]=j;k()})}}else c()}
+function u(a){var b=[],e;for(e in a)a.hasOwnProperty(e)&&b.push(e);return b.sort(function(a,b){return b-a})}function w(a,b,e){function c(b,i){if(i<b.length)n(b[i].pattern,b[i],a,function(){c(b,++i)});else{var f=a,j=function(a,b,c,e){if(c<b.length){++x;var d=b[c],f=t[s][d],a=a.substr(0,d)+a.substr(d).replace(f.replace,f["with"]),d=function(){j(a,b,++c,e)};0<x%250?d():setTimeout(d,0)}else e(a)},k=u(t[s]);j(f,k,0,function(a){delete t[s];delete r[s];--s;e(a)})}}++s;c(b,0)}
+function v(a,b,e){var c=y[b]||[],d=y[z]||[],b=A[b]?c:c.concat(d);w(a.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/&(?![\w\#]+;)/g,"&amp;"),b,e)}
+function B(a,b,e){if(b<a.length){var c=a[b],d,i=h(c)||h(c.parentNode);if(!i){var f=/\blang(?:uage)?-(\w+)/;(f=c.className.match(f)||c.parentNode.className.match(f))&&(i=f[1])}d=i;return!(-1<(" "+c.className+" ").indexOf(" rainbow "))&&d?(d=d.toLowerCase(),c.className+=c.className?" rainbow":"rainbow",v(c.innerHTML,d,function(f){c.innerHTML=f;t={};r={};C&&C(c,d);setTimeout(function(){B(a,++b,e)},0)})):B(a,++b,e)}e&&e()}
+function D(a,b){var a=a&&"function"==typeof a.getElementsByTagName?a:document,e=a.getElementsByTagName("pre"),c=a.getElementsByTagName("code"),d,i=[];for(d=0;d<c.length;++d)i.push(c[d]);for(d=0;d<e.length;++d)e[d].getElementsByTagName("code").length||i.push(e[d]);B(i,0,b)}var t={},r={},y={},A={},s=0,z=0,o=0,x=0,m,C;
+window.Rainbow={extend:function(a,b,e){1==arguments.length&&(b=a,a=z);A[a]=e;y[a]=b.concat(y[a]||[])},b:function(a){C=a},a:function(a){m=a},color:function(a,b,e){if("string"==typeof a)return v(a,b,e);if("function"==typeof a)return D(0,a);D(a,b)}};window.addEventListener?window.addEventListener("load",Rainbow.color,!1):window.attachEvent("onload",Rainbow.color);Rainbow.onHighlight=Rainbow.b;Rainbow.addClass=Rainbow.a;
12 themes/all-hallows-eve.css
View
@@ -4,21 +4,11 @@
* Adapted from Ultraviolet RubyGem
*
* @author Flinn Mueller
- * @version 1.0.1
+ * @version 1.1.0
*/
pre {
background: #000;
- word-wrap: break-word;
- margin: 0px;
- padding: 0px;
- padding: 10px;
color: #fff;
- font-size: 14px;
- margin-bottom: 20px;
-}
-
-pre, code {
- font-family: 'Monaco', courier, monospace;
}
pre .comment {
12 themes/blackboard.css
View
@@ -5,21 +5,11 @@
*
* @author Domenico Carbotta
* @author Craig Campbell
- * @version 1.0.2
+ * @version 1.1.0
*/
pre {
background: #0B1022;
- word-wrap: break-word;
- margin: 0px;
- padding: 0px;
- padding: 10px;
color: #fff;
- font-size: 14px;
- margin-bottom: 20px;
-}
-
-pre, code {
- font-family: 'Monaco', courier, monospace;
}
pre .comment {
12 themes/espresso-libre.css
View
@@ -4,21 +4,11 @@
* Adapted from Ultraviolet RubyGem
*
* @author Flinn Mueller
- * @version 1.0
+ * @version 1.1.0
*/
pre {
background-color: #2a211c;
- word-wrap: break-word;
- margin: 0px;
- padding: 0px;
- padding: 10px;
color: #bdae9d;
- font-size: 14px;
- margin-bottom: 20px;
-}
-
-pre, code {
- font-family: 'Monaco', courier, monospace;
}
pre .support.class, pre .support.type {
34 themes/github.css
View
@@ -2,43 +2,11 @@
* GitHub theme
*
* @author Craig Campbell
- * @version 1.0.4
+ * @version 1.1.0
*/
-pre {
- border: 1px solid #ccc;
- word-wrap: break-word;
- padding: 6px 10px;
- line-height: 19px;
- margin-bottom: 20px;
-}
-
-code {
- border: 1px solid #eaeaea;
- margin: 0px 2px;
- padding: 0px 5px;
- font-size: 12px;
-}
-
-pre code {
- border: 0px;
- padding: 0px;
- margin: 0px;
- -moz-border-radius: 0px;
- -webkit-border-radius: 0px;
- border-radius: 0px;
-}
-
pre, code {
- font-family: Consolas, 'Liberation Mono', Courier, monospace;
color: #333;
background: #f8f8f8;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- border-radius: 3px;
-}
-
-pre, pre code {
- font-size: 13px;
}
pre .comment {
12 themes/obsidian.css
View
@@ -5,21 +5,11 @@
* http://studiostyl.es/schemes/son-of-obsidian
*
* @author Dan Stewart <dan@stewshack.com>
- * @version 1.0
+ * @version 1.1.0
*/
pre {
background: #22282A;
- word-wrap: break-word;
- margin: 0px;
- padding: 0px;
- padding: 10px;
color: #F1F2F3;
- font-size: 14px;
- margin-bottom: 20px;
-}
-
-pre, code {
- font-family: 'Monaco', courier, monospace;
}
pre .comment {
14 themes/pastie.css
View
@@ -4,24 +4,12 @@
* @author pygments.org
* @author pastie.org
* @author Simon Potter
- * @version 1.0
+ * @version 1.1.0
*/
pre {
- /* original is white background with no border */
background-color: #F8F8FF;
- border: 1px solid #DEDEDE;
- word-wrap: break-word;
- margin: 0;
- padding: 0;
color: #000;
- font-size: 13px;
- line-height: 16px;
- margin-bottom: 20px
-}
-
-pre, code {
- font-family: monospace;
}
pre .comment {
12 themes/solarized-dark.css
View
@@ -5,21 +5,11 @@
*
* @author Ethan Schoonover
* @author David Litmark
- * @version 1.0.0
+ * @version 1.1.0
*/
pre {
background: #002b36; /* base03 */
- word-wrap: break-word;
- margin: 0px;
- padding: 0px;
- padding: 10px;
color: #839496; /* base0 */
- font-size: 14px;
- margin-bottom: 20px;
-}
-
-pre, code {
- font-family: 'Monaco', courier, monospace;
}
pre .comment {
12 themes/solarized-light.css
View
@@ -5,21 +5,11 @@
*
* @author Ethan Schoonover
* @author David Litmark
- * @version 1.0.0
+ * @version 1.1.0
*/
pre {
background: #fdf6e3; /* base3 */
- word-wrap: break-word;
- margin: 0px;
- padding: 0px;
- padding: 10px;
color: #657b83; /* base00 */
- font-size: 14px;
- margin-bottom: 20px;
-}
-
-pre, code {
- font-family: 'Monaco', courier, monospace;
}
pre .comment {
31 themes/sunburst.css
View
@@ -5,21 +5,11 @@
*
* @author Stanley Rost
* @author Rachel Baker
- * @version 1.0.0
+ * @version 1.1.0
*/
pre {
background-color: #000;
- word-wrap: break-word;
- margin: 0px;
- padding: 0px;
- padding: 10px;
color: #fff;
- font-size: 14px;
- margin-bottom: 20px;
-}
-
-pre, code {
- font-family: 'Monaco', courier, monospace;
}
pre .comment {
@@ -35,13 +25,12 @@ pre .storage {
}
pre .string, pre .entity.name.class, pre .comment.docstring {
-color: #65B042;
-/* green */
+ color: #65B042;
}
pre .string.regexp {
- color: #E9C062;
- }
+ color: #E9C062;
+}
pre .string.constant {
color: #DDF2A4;
@@ -49,20 +38,22 @@ pre .string.constant {
pre .constant.hex-color {
color: #DD7B3B;
- /* orange */
}
+
pre .support, pre .tag.script, pre .function.call {
color: #dad085;
}
+
pre .support.css-property {
color: #C5AF75;
}
+
pre .support.tag.style {
color: #fff;
}
+
pre .keyword, pre .selector {
color: #E28964;
- /* dark pink */
}
pre .keyword.namespace {
@@ -88,8 +79,8 @@ pre .entity.name.id {
pre .variable, pre .variable.global {
color: #3E87E3;
- }
-pre .variable.class {
+}
- }
+pre .variable.class {
+}
11 themes/tomorrow-night.css
View
@@ -3,20 +3,11 @@
*
* @author Chris Kempson
* @author skim
- * @version 1.0.0
+ * @version 1.1.0
*/
pre {
background-color: #1d1f21;
- word-wrap: break-word;
- margin: 0px;
- padding: 0 10px;
color: #c5c8c6;
- font-size: 14px;
- margin-bottom: 20px;
-}
-
-pre, code {
- font-family: 'Monaco', courier, monospace;
}
pre .comment {
9 themes/tricolore.css
View
@@ -2,18 +2,11 @@
* Tricolore theme
*
* @author Jean Nicolas
- * @version 1.0.1
+ * @version 1.1.0
*/
pre {
background: #FFF;
- word-wrap: break-word;
- margin: 0px;
- padding: 0px;
- padding: 10px;
color: #000;
- font-size: 12px;
- margin-bottom: 20px;
- line-height: 16px;
}
pre, code {
12 themes/twilight.css
View
@@ -5,21 +5,11 @@
*
* @author Michael Sheets
* @author Jesse Farmer <jesse@20bits.com>
- * @version 1.0.1
+ * @version 1.1.0
*/
pre {
background: #141414;
- word-wrap: break-word;
- margin: 0px;
- padding: 0px;
- padding: 10px;
color: #F8F8F8;
- font-size: 14px;
- margin-bottom: 20px;
-}
-
-pre, code {
- font-family: 'Monaco', courier, monospace;
}
pre .comment {
12 themes/zenburnesque.css
View
@@ -4,21 +4,11 @@
* Adapted from Ultraviolet RubyGem
*
* @author Flinn Mueller
- * @version 1.0
+ * @version 1.1.0
*/
pre {
background: #404040;
- word-wrap: break-word;
- margin: 0px;
- padding: 0px;
- padding: 10px;
color: #dedede;
- font-size: 14px;
- margin-bottom: 20px;
-}
-
-pre, code {
- font-family: 'Monaco', courier, monospace;
}
pre .comment {
Something went wrong with that request. Please try again.