##// END OF EJS Templates
Merge pull request #6996 from bollwyvl/cm-meta-highlight...
Min RK -
r19292:e2c194f5 merge
parent child Browse files
Show More
@@ -0,0 +1,5 b''
1 /* load the codemirror defaults as LESS so that highlight.less
2 can load default theme declarations by reference without pulling in the
3 nasty positioning
4 */
5 @import (less) "../../components/codemirror/lib/codemirror.css";
@@ -0,0 +1,58 b''
1 casper.notebook_test(function () {
2 this.on('remote.callback', function(data){
3 if(data.error_expected){
4 that.test.assertEquals(
5 data.error,
6 data.expected,
7 "!highlight: " + data.provided + " errors " + data.expected
8 );
9 }else{
10 that.test.assertEquals(
11 data.observed,
12 data.expected,
13 "highlight: " + data.provided + " as " + data.expected
14 );
15 }
16 });
17
18 var that = this;
19 // syntax highlighting
20 [
21 {to: "gfm"},
22 {to: "python"},
23 {to: "ipython"},
24 {to: "ipythongfm"},
25 {to: "text/x-markdown", from: [".md"]},
26 {to: "text/x-python", from: [".py", "Python"]},
27 {to: "application/json", from: ["json", "JSON"]},
28 {to: "text/x-ruby", from: [".rb", "ruby", "Ruby"]},
29 {to: "application/ld+json", from: ["json-ld", "JSON-LD"]},
30 {from: [".pyc"], error: true},
31 {from: ["../"], error: true},
32 {from: ["//"], error: true},
33 ].map(function (mode) {
34 (mode.from || []).concat(mode.to || []).map(function(from){
35 casper.evaluate(function(from, expected, error_expected){
36 IPython.utils.requireCodeMirrorMode(from, function(observed){
37 window.callPhantom({
38 provided: from,
39 expected: expected,
40 observed: observed,
41 error_expected: error_expected
42 });
43 }, function(error){
44 window.callPhantom({
45 provided: from,
46 expected: expected,
47 error: error,
48 error_expected: error_expected
49 });
50 });
51 }, {
52 from: from,
53 expected: mode.to,
54 error_expected: mode.error
55 });
56 });
57 });
58 }); No newline at end of file
@@ -5,6 +5,8 b' define(['
5 5 'base/js/namespace',
6 6 'jquery',
7 7 'codemirror/lib/codemirror',
8 // silently upgrades CodeMirror
9 'codemirror/mode/meta',
8 10 ], function(IPython, $, CodeMirror){
9 11 "use strict";
10 12
@@ -603,20 +605,40 b' define(['
603 605 msg += ajax_error_msg(jqXHR);
604 606 console.log(msg);
605 607 };
606
608
607 609 var requireCodeMirrorMode = function (mode, callback, errback) {
608 /**
609 * load a mode with requirejs
610 /**
611 * find a predefined mode or detect from CM metadata then
612 * require and callback with the resolveable mode string: mime or
613 * custom name
610 614 */
611 if (typeof mode != "string") mode = mode.name;
612 if (CodeMirror.modes.hasOwnProperty(mode)) {
613 callback(CodeMirror.modes.mode);
615
616 var modename = (typeof mode == "string") ? mode :
617 mode.mode || mode.name;
618
619 // simplest, cheapest check by mode name: mode may also have config
620 if (CodeMirror.modes.hasOwnProperty(modename)) {
621 // return the full mode object, if it has a name
622 callback(mode.name ? mode : modename);
614 623 return;
615 624 }
625
626 // *somehow* get back a CM.modeInfo-like object that has .mode and
627 // .mime
628 var info = (mode && mode.mode && mode.mime && mode) ||
629 CodeMirror.findModeByName(modename) ||
630 CodeMirror.findModeByExtension(modename.split(".").slice(-1)) ||
631 CodeMirror.findModeByMIME(modename) ||
632 {mode: modename, mime: modename};
633
616 634 require([
617 635 // might want to use CodeMirror.modeURL here
618 ['codemirror/mode', mode, mode].join('/'),
619 ], callback, errback
636 ['codemirror/mode', info.mode, info.mode].join('/'),
637 ], function() {
638 // return the original mode, as from a kernelspec on first load
639 // or the mimetype, as for most highlighting
640 callback(mode.name ? mode : info.mime);
641 }, errback
620 642 );
621 643 };
622 644
@@ -41,12 +41,10 b' function($,'
41 41 cm.clearHistory();
42 42
43 43 // Find and load the highlighting mode
44 var modeinfo = CodeMirror.findModeByMIME(model.mimetype);
45 if (modeinfo) {
46 utils.requireCodeMirrorMode(modeinfo.mode, function() {
47 cm.setOption('mode', modeinfo.mode);
48 });
49 }
44 utils.requireCodeMirrorMode(model.mimetype, function(spec) {
45 var mode = CodeMirror.getMode({}, spec);
46 cm.setOption('mode', mode);
47 });
50 48 that.save_enabled = true;
51 49 },
52 50 function(error) {
@@ -558,8 +558,8 b' define(['
558 558 return;
559 559 }
560 560 if (mode.search('magic_') !== 0) {
561 utils.requireCodeMirrorMode(mode, function () {
562 that.code_mirror.setOption('mode', mode);
561 utils.requireCodeMirrorMode(mode, function (spec) {
562 that.code_mirror.setOption('mode', spec);
563 563 });
564 564 return;
565 565 }
@@ -570,7 +570,7 b' define(['
570 570 if(current_mode == magic_mode){
571 571 return;
572 572 }
573 utils.requireCodeMirrorMode(mode, function () {
573 utils.requireCodeMirrorMode(mode, function (spec) {
574 574 // create on the fly a mode that switch between
575 575 // plain/text and something else, otherwise `%%` is
576 576 // source of some highlight issues.
@@ -579,7 +579,7 b' define(['
579 579 CodeMirror.getMode(config, 'text/plain'),
580 580 // always set something on close
581 581 {open: open, close: close,
582 mode: CodeMirror.getMode(config, mode),
582 mode: CodeMirror.getMode(config, spec),
583 583 delimStyle: "delimit"
584 584 }
585 585 );
@@ -102,16 +102,16 b' define(['
102 102 return code;
103 103 }
104 104 }
105 utils.requireCodeMirrorMode(lang, function () {
105 utils.requireCodeMirrorMode(lang, function (spec) {
106 106 var el = document.createElement("div");
107 var mode = CodeMirror.getMode({}, lang);
107 var mode = CodeMirror.getMode({}, spec);
108 108 if (!mode) {
109 109 console.log("No CodeMirror mode: " + lang);
110 110 callback(null, code);
111 111 return;
112 112 }
113 113 try {
114 CodeMirror.runMode(code, mode, el);
114 CodeMirror.runMode(code, spec, el);
115 115 callback(null, el.innerHTML);
116 116 } catch (err) {
117 117 console.log("Failed to highlight " + lang + " code", err);
@@ -1585,17 +1585,16 b' define(['
1585 1585 }
1586 1586 this.codemirror_mode = newmode;
1587 1587 codecell.CodeCell.options_default.cm_config.mode = newmode;
1588 var modename = newmode.mode || newmode.name || newmode;
1589 1588
1590 1589 var that = this;
1591 utils.requireCodeMirrorMode(modename, function () {
1590 utils.requireCodeMirrorMode(newmode, function (spec) {
1592 1591 that.get_cells().map(function(cell, i) {
1593 1592 if (cell.cell_type === 'code'){
1594 cell.code_mirror.setOption('mode', newmode);
1593 cell.code_mirror.setOption('mode', spec);
1595 1594 // This is currently redundant, because cm_config ends up as
1596 1595 // codemirror's own .options object, but I don't want to
1597 1596 // rely on that.
1598 cell.cm_config.mode = newmode;
1597 cell.cm_config.mode = spec;
1599 1598 }
1600 1599 });
1601 1600 });
@@ -5,160 +5,108 b' Adapted from GitHub theme'
5 5
6 6 */
7 7
8 pre code {
9 display: block;
10 padding: 0.5em;
8 @import (reference) "highlight-refs.less";
9
10 @highlight-base: #000;
11
12 .highlight-base{
13 color: @highlight-base;
14 }
15
16 .highlight-variable{
17 .highlight-base();
18 }
19
20 .highlight-variable-2{
21 color: lighten(@highlight-base, 10%);
11 22 }
12 23
13 .highlight-base,
14 pre code,
15 pre .subst,
16 pre .tag .title,
17 pre .lisp .title,
18 pre .clojure .built_in,
19 pre .nginx .title {
20 color: black;
24 .highlight-variable-3{
25 color: lighten(@highlight-base, 20%);
21 26 }
22 27
23 .highlight-string,
24 pre .string,
25 pre .constant,
26 pre .parent,
27 pre .tag .value,
28 pre .rules .value,
29 pre .rules .value .number,
30 pre .preprocessor,
31 pre .ruby .symbol,
32 pre .ruby .symbol .string,
33 pre .aggregate,
34 pre .template_tag,
35 pre .django .variable,
36 pre .smalltalk .class,
37 pre .addition,
38 pre .flow,
39 pre .stream,
40 pre .bash .variable,
41 pre .apache .tag,
42 pre .apache .cbracket,
43 pre .tex .command,
44 pre .tex .special,
45 pre .erlang_repl .function_or_atom,
46 pre .markdown .header {
28 .highlight-string{
47 29 color: #BA2121;
48 30 }
49 31
50 .highlight-comment,
51 pre .comment,
52 pre .annotation,
53 pre .template_comment,
54 pre .diff .header,
55 pre .chunk,
56 pre .markdown .blockquote {
32 .highlight-comment{
57 33 color: #408080;
58 34 font-style: italic;
59 35 }
60 36
61 .highlight-number,
62 pre .number,
63 pre .date,
64 pre .regexp,
65 pre .literal,
66 pre .smalltalk .symbol,
67 pre .smalltalk .char,
68 pre .go .constant,
69 pre .change,
70 pre .markdown .bullet,
71 pre .markdown .link_url {
37 .highlight-number{
72 38 color: #080;
73 39 }
74 40
75 pre .label,
76 pre .javadoc,
77 pre .ruby .string,
78 pre .decorator,
79 pre .filter .argument,
80 pre .localvars,
81 pre .array,
82 pre .attr_selector,
83 pre .important,
84 pre .pseudo,
85 pre .pi,
86 pre .doctype,
87 pre .deletion,
88 pre .envvar,
89 pre .shebang,
90 pre .apache .sqbracket,
91 pre .nginx .built_in,
92 pre .tex .formula,
93 pre .erlang_repl .reserved,
94 pre .prompt,
95 pre .markdown .link_label,
96 pre .vhdl .attribute,
97 pre .clojure .attribute,
98 pre .coffeescript .property {
99 color: #88F
41 .highlight-atom{
42 color: #88F;
100 43 }
101 44
102 .highlight-keyword,
103 pre .keyword,
104 pre .id,
105 pre .phpdoc,
106 pre .aggregate,
107 pre .css .tag,
108 pre .javadoctag,
109 pre .phpdoc,
110 pre .yardoctag,
111 pre .smalltalk .class,
112 pre .winutils,
113 pre .bash .variable,
114 pre .apache .tag,
115 pre .go .typename,
116 pre .tex .command,
117 pre .markdown .strong,
118 pre .request,
119 pre .status {
45 .highlight-keyword{
120 46 color: #008000;
121 47 font-weight: bold;
122 48 }
123 49
124 .highlight-builtin,
125 pre .built_in {
50 .highlight-builtin{
126 51 color: #008000;
127 52 }
128 53
129 pre .markdown .emphasis {
130 font-style: italic;
54 .highlight-error{
55 color: #f00;
131 56 }
132 57
133 pre .nginx .built_in {
134 font-weight: normal;
58 .highlight-operator{
59 color: #AA22FF;
60 font-weight: bold;
135 61 }
136 62
137 pre .coffeescript .javascript,
138 pre .javascript .xml,
139 pre .tex .formula,
140 pre .xml .javascript,
141 pre .xml .vbscript,
142 pre .xml .css,
143 pre .xml .cdata {
144 opacity: 0.5;
63 .highlight-meta{
64 color: #AA22FF;
145 65 }
146 66
67 /* previously not defined, copying from default codemirror */
68 .highlight-def{ .cm-s-default.cm-def() }
69 .highlight-punctuation{ .cm-s-default.cm-punctuation() }
70 .highlight-property{ .cm-s-default.cm-property() }
71 .highlight-string-2{ .cm-s-default.cm-string-2() }
72 .highlight-qualifier{ .cm-s-default.cm-qualifier() }
73 .highlight-bracket{ .cm-s-default.cm-bracket() }
74 .highlight-tag{ .cm-s-default.cm-tag() }
75 .highlight-attribute{ .cm-s-default.cm-attribute() }
76 .highlight-header{ .cm-s-default.cm-header() }
77 .highlight-quote{ .cm-s-default.cm-quote() }
78 .highlight-link{ .cm-s-default.cm-link() }
79
80
147 81 /* apply the same style to codemirror */
148 .cm-s-ipython {
149 span.cm-variable { .highlight-base()}
150 span.cm-keyword { .highlight-keyword() }
151 span.cm-number { .highlight-number() }
152 span.cm-comment { .highlight-comment() }
153 span.cm-string { .highlight-string()}
154 span.cm-builtin { .highlight-builtin() }
155 span.cm-error { color: #f00; }
156 span.cm-operator {color: #AA22FF; font-weight: bold;}
157 span.cm-meta {color: #AA22FF;}
158
159 span.cm-tab {
160 background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=);
161 background-position: right;
162 background-repeat: no-repeat;
163 }
82 .cm-s-ipython span {
83 &.cm-keyword { .highlight-keyword() }
84 &.cm-atom { .highlight-atom() }
85 &.cm-number { .highlight-number() }
86 &.cm-def { .highlight-def() }
87 &.cm-variable { .highlight-variable() }
88 &.cm-punctuation { .highlight-punctuation() }
89 &.cm-property { .highlight-property() }
90 &.cm-operator { .highlight-operator() }
91 &.cm-variable-2 { .highlight-variable-2() }
92 &.cm-variable-3 { .highlight-variable-3() }
93 &.cm-comment { .highlight-comment() }
94 &.cm-string { .highlight-string() }
95 &.cm-string-2 { .highlight-string-2() }
96 &.cm-meta { .highlight-meta() }
97 &.cm-qualifier { .highlight-qualifier() }
98 &.cm-builtin { .highlight-builtin() }
99 &.cm-bracket { .highlight-bracket() }
100 &.cm-tag { .highlight-tag() }
101 &.cm-attribute { .highlight-attribute() }
102 &.cm-header { .highlight-header() }
103 &.cm-quote { .highlight-quote() }
104 &.cm-link { .highlight-link() }
105 &.cm-error { .highlight-error() }
106
107 &.cm-tab {
108 background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=);
109 background-position: right;
110 background-repeat: no-repeat;
111 }
164 112 }
@@ -563,145 +563,103 b' Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiac'
563 563 Adapted from GitHub theme
564 564
565 565 */
566 pre code {
567 display: block;
568 padding: 0.5em;
569 }
570 .highlight-base,
571 pre code,
572 pre .subst,
573 pre .tag .title,
574 pre .lisp .title,
575 pre .clojure .built_in,
576 pre .nginx .title {
577 color: black;
566 .highlight-base {
567 color: #000000;
568 }
569 .highlight-variable {
570 color: #000000;
571 }
572 .highlight-variable-2 {
573 color: #1a1a1a;
574 }
575 .highlight-variable-3 {
576 color: #333333;
578 577 }
579 .highlight-string,
580 pre .string,
581 pre .constant,
582 pre .parent,
583 pre .tag .value,
584 pre .rules .value,
585 pre .rules .value .number,
586 pre .preprocessor,
587 pre .ruby .symbol,
588 pre .ruby .symbol .string,
589 pre .aggregate,
590 pre .template_tag,
591 pre .django .variable,
592 pre .smalltalk .class,
593 pre .addition,
594 pre .flow,
595 pre .stream,
596 pre .bash .variable,
597 pre .apache .tag,
598 pre .apache .cbracket,
599 pre .tex .command,
600 pre .tex .special,
601 pre .erlang_repl .function_or_atom,
602 pre .markdown .header {
578 .highlight-string {
603 579 color: #BA2121;
604 580 }
605 .highlight-comment,
606 pre .comment,
607 pre .annotation,
608 pre .template_comment,
609 pre .diff .header,
610 pre .chunk,
611 pre .markdown .blockquote {
581 .highlight-comment {
612 582 color: #408080;
613 583 font-style: italic;
614 584 }
615 .highlight-number,
616 pre .number,
617 pre .date,
618 pre .regexp,
619 pre .literal,
620 pre .smalltalk .symbol,
621 pre .smalltalk .char,
622 pre .go .constant,
623 pre .change,
624 pre .markdown .bullet,
625 pre .markdown .link_url {
585 .highlight-number {
626 586 color: #080;
627 587 }
628 pre .label,
629 pre .javadoc,
630 pre .ruby .string,
631 pre .decorator,
632 pre .filter .argument,
633 pre .localvars,
634 pre .array,
635 pre .attr_selector,
636 pre .important,
637 pre .pseudo,
638 pre .pi,
639 pre .doctype,
640 pre .deletion,
641 pre .envvar,
642 pre .shebang,
643 pre .apache .sqbracket,
644 pre .nginx .built_in,
645 pre .tex .formula,
646 pre .erlang_repl .reserved,
647 pre .prompt,
648 pre .markdown .link_label,
649 pre .vhdl .attribute,
650 pre .clojure .attribute,
651 pre .coffeescript .property {
652 color: #8888ff;
653 }
654 .highlight-keyword,
655 pre .keyword,
656 pre .id,
657 pre .phpdoc,
658 pre .aggregate,
659 pre .css .tag,
660 pre .javadoctag,
661 pre .phpdoc,
662 pre .yardoctag,
663 pre .smalltalk .class,
664 pre .winutils,
665 pre .bash .variable,
666 pre .apache .tag,
667 pre .go .typename,
668 pre .tex .command,
669 pre .markdown .strong,
670 pre .request,
671 pre .status {
588 .highlight-atom {
589 color: #88F;
590 }
591 .highlight-keyword {
672 592 color: #008000;
673 593 font-weight: bold;
674 594 }
675 .highlight-builtin,
676 pre .built_in {
595 .highlight-builtin {
677 596 color: #008000;
678 597 }
679 pre .markdown .emphasis {
680 font-style: italic;
598 .highlight-error {
599 color: #f00;
681 600 }
682 pre .nginx .built_in {
683 font-weight: normal;
601 .highlight-operator {
602 color: #AA22FF;
603 font-weight: bold;
604 }
605 .highlight-meta {
606 color: #AA22FF;
684 607 }
685 pre .coffeescript .javascript,
686 pre .javascript .xml,
687 pre .tex .formula,
688 pre .xml .javascript,
689 pre .xml .vbscript,
690 pre .xml .css,
691 pre .xml .cdata {
692 opacity: 0.5;
608 /* previously not defined, copying from default codemirror */
609 .highlight-def {
610 color: #00f;
693 611 }
694 /* apply the same style to codemirror */
695 .cm-s-ipython span.cm-variable {
696 color: black;
612 .highlight-string-2 {
613 color: #f50;
614 }
615 .highlight-qualifier {
616 color: #555;
617 }
618 .highlight-bracket {
619 color: #997;
620 }
621 .highlight-tag {
622 color: #170;
697 623 }
624 .highlight-attribute {
625 color: #00c;
626 }
627 .highlight-header {
628 color: blue;
629 }
630 .highlight-quote {
631 color: #090;
632 }
633 .highlight-link {
634 color: #00c;
635 }
636 /* apply the same style to codemirror */
698 637 .cm-s-ipython span.cm-keyword {
699 638 color: #008000;
700 639 font-weight: bold;
701 640 }
641 .cm-s-ipython span.cm-atom {
642 color: #88F;
643 }
702 644 .cm-s-ipython span.cm-number {
703 645 color: #080;
704 646 }
647 .cm-s-ipython span.cm-def {
648 color: #00f;
649 }
650 .cm-s-ipython span.cm-variable {
651 color: #000000;
652 }
653 .cm-s-ipython span.cm-operator {
654 color: #AA22FF;
655 font-weight: bold;
656 }
657 .cm-s-ipython span.cm-variable-2 {
658 color: #1a1a1a;
659 }
660 .cm-s-ipython span.cm-variable-3 {
661 color: #333333;
662 }
705 663 .cm-s-ipython span.cm-comment {
706 664 color: #408080;
707 665 font-style: italic;
@@ -709,18 +667,38 b' pre .xml .cdata {'
709 667 .cm-s-ipython span.cm-string {
710 668 color: #BA2121;
711 669 }
670 .cm-s-ipython span.cm-string-2 {
671 color: #f50;
672 }
673 .cm-s-ipython span.cm-meta {
674 color: #AA22FF;
675 }
676 .cm-s-ipython span.cm-qualifier {
677 color: #555;
678 }
712 679 .cm-s-ipython span.cm-builtin {
713 680 color: #008000;
714 681 }
715 .cm-s-ipython span.cm-error {
716 color: #f00;
682 .cm-s-ipython span.cm-bracket {
683 color: #997;
717 684 }
718 .cm-s-ipython span.cm-operator {
719 color: #AA22FF;
720 font-weight: bold;
685 .cm-s-ipython span.cm-tag {
686 color: #170;
721 687 }
722 .cm-s-ipython span.cm-meta {
723 color: #AA22FF;
688 .cm-s-ipython span.cm-attribute {
689 color: #00c;
690 }
691 .cm-s-ipython span.cm-header {
692 color: blue;
693 }
694 .cm-s-ipython span.cm-quote {
695 color: #090;
696 }
697 .cm-s-ipython span.cm-link {
698 color: #00c;
699 }
700 .cm-s-ipython span.cm-error {
701 color: #f00;
724 702 }
725 703 .cm-s-ipython span.cm-tab {
726 704 background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=);
@@ -8469,145 +8469,103 b' Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiac'
8469 8469 Adapted from GitHub theme
8470 8470
8471 8471 */
8472 pre code {
8473 display: block;
8474 padding: 0.5em;
8475 }
8476 .highlight-base,
8477 pre code,
8478 pre .subst,
8479 pre .tag .title,
8480 pre .lisp .title,
8481 pre .clojure .built_in,
8482 pre .nginx .title {
8483 color: black;
8472 .highlight-base {
8473 color: #000000;
8474 }
8475 .highlight-variable {
8476 color: #000000;
8477 }
8478 .highlight-variable-2 {
8479 color: #1a1a1a;
8480 }
8481 .highlight-variable-3 {
8482 color: #333333;
8484 8483 }
8485 .highlight-string,
8486 pre .string,
8487 pre .constant,
8488 pre .parent,
8489 pre .tag .value,
8490 pre .rules .value,
8491 pre .rules .value .number,
8492 pre .preprocessor,
8493 pre .ruby .symbol,
8494 pre .ruby .symbol .string,
8495 pre .aggregate,
8496 pre .template_tag,
8497 pre .django .variable,
8498 pre .smalltalk .class,
8499 pre .addition,
8500 pre .flow,
8501 pre .stream,
8502 pre .bash .variable,
8503 pre .apache .tag,
8504 pre .apache .cbracket,
8505 pre .tex .command,
8506 pre .tex .special,
8507 pre .erlang_repl .function_or_atom,
8508 pre .markdown .header {
8484 .highlight-string {
8509 8485 color: #BA2121;
8510 8486 }
8511 .highlight-comment,
8512 pre .comment,
8513 pre .annotation,
8514 pre .template_comment,
8515 pre .diff .header,
8516 pre .chunk,
8517 pre .markdown .blockquote {
8487 .highlight-comment {
8518 8488 color: #408080;
8519 8489 font-style: italic;
8520 8490 }
8521 .highlight-number,
8522 pre .number,
8523 pre .date,
8524 pre .regexp,
8525 pre .literal,
8526 pre .smalltalk .symbol,
8527 pre .smalltalk .char,
8528 pre .go .constant,
8529 pre .change,
8530 pre .markdown .bullet,
8531 pre .markdown .link_url {
8491 .highlight-number {
8532 8492 color: #080;
8533 8493 }
8534 pre .label,
8535 pre .javadoc,
8536 pre .ruby .string,
8537 pre .decorator,
8538 pre .filter .argument,
8539 pre .localvars,
8540 pre .array,
8541 pre .attr_selector,
8542 pre .important,
8543 pre .pseudo,
8544 pre .pi,
8545 pre .doctype,
8546 pre .deletion,
8547 pre .envvar,
8548 pre .shebang,
8549 pre .apache .sqbracket,
8550 pre .nginx .built_in,
8551 pre .tex .formula,
8552 pre .erlang_repl .reserved,
8553 pre .prompt,
8554 pre .markdown .link_label,
8555 pre .vhdl .attribute,
8556 pre .clojure .attribute,
8557 pre .coffeescript .property {
8558 color: #8888ff;
8559 }
8560 .highlight-keyword,
8561 pre .keyword,
8562 pre .id,
8563 pre .phpdoc,
8564 pre .aggregate,
8565 pre .css .tag,
8566 pre .javadoctag,
8567 pre .phpdoc,
8568 pre .yardoctag,
8569 pre .smalltalk .class,
8570 pre .winutils,
8571 pre .bash .variable,
8572 pre .apache .tag,
8573 pre .go .typename,
8574 pre .tex .command,
8575 pre .markdown .strong,
8576 pre .request,
8577 pre .status {
8494 .highlight-atom {
8495 color: #88F;
8496 }
8497 .highlight-keyword {
8578 8498 color: #008000;
8579 8499 font-weight: bold;
8580 8500 }
8581 .highlight-builtin,
8582 pre .built_in {
8501 .highlight-builtin {
8583 8502 color: #008000;
8584 8503 }
8585 pre .markdown .emphasis {
8586 font-style: italic;
8504 .highlight-error {
8505 color: #f00;
8587 8506 }
8588 pre .nginx .built_in {
8589 font-weight: normal;
8507 .highlight-operator {
8508 color: #AA22FF;
8509 font-weight: bold;
8590 8510 }
8591 pre .coffeescript .javascript,
8592 pre .javascript .xml,
8593 pre .tex .formula,
8594 pre .xml .javascript,
8595 pre .xml .vbscript,
8596 pre .xml .css,
8597 pre .xml .cdata {
8598 opacity: 0.5;
8511 .highlight-meta {
8512 color: #AA22FF;
8599 8513 }
8600 /* apply the same style to codemirror */
8601 .cm-s-ipython span.cm-variable {
8602 color: black;
8514 /* previously not defined, copying from default codemirror */
8515 .highlight-def {
8516 color: #00f;
8517 }
8518 .highlight-string-2 {
8519 color: #f50;
8520 }
8521 .highlight-qualifier {
8522 color: #555;
8523 }
8524 .highlight-bracket {
8525 color: #997;
8526 }
8527 .highlight-tag {
8528 color: #170;
8603 8529 }
8530 .highlight-attribute {
8531 color: #00c;
8532 }
8533 .highlight-header {
8534 color: blue;
8535 }
8536 .highlight-quote {
8537 color: #090;
8538 }
8539 .highlight-link {
8540 color: #00c;
8541 }
8542 /* apply the same style to codemirror */
8604 8543 .cm-s-ipython span.cm-keyword {
8605 8544 color: #008000;
8606 8545 font-weight: bold;
8607 8546 }
8547 .cm-s-ipython span.cm-atom {
8548 color: #88F;
8549 }
8608 8550 .cm-s-ipython span.cm-number {
8609 8551 color: #080;
8610 8552 }
8553 .cm-s-ipython span.cm-def {
8554 color: #00f;
8555 }
8556 .cm-s-ipython span.cm-variable {
8557 color: #000000;
8558 }
8559 .cm-s-ipython span.cm-operator {
8560 color: #AA22FF;
8561 font-weight: bold;
8562 }
8563 .cm-s-ipython span.cm-variable-2 {
8564 color: #1a1a1a;
8565 }
8566 .cm-s-ipython span.cm-variable-3 {
8567 color: #333333;
8568 }
8611 8569 .cm-s-ipython span.cm-comment {
8612 8570 color: #408080;
8613 8571 font-style: italic;
@@ -8615,18 +8573,38 b' pre .xml .cdata {'
8615 8573 .cm-s-ipython span.cm-string {
8616 8574 color: #BA2121;
8617 8575 }
8576 .cm-s-ipython span.cm-string-2 {
8577 color: #f50;
8578 }
8579 .cm-s-ipython span.cm-meta {
8580 color: #AA22FF;
8581 }
8582 .cm-s-ipython span.cm-qualifier {
8583 color: #555;
8584 }
8618 8585 .cm-s-ipython span.cm-builtin {
8619 8586 color: #008000;
8620 8587 }
8621 .cm-s-ipython span.cm-error {
8622 color: #f00;
8588 .cm-s-ipython span.cm-bracket {
8589 color: #997;
8623 8590 }
8624 .cm-s-ipython span.cm-operator {
8625 color: #AA22FF;
8626 font-weight: bold;
8591 .cm-s-ipython span.cm-tag {
8592 color: #170;
8627 8593 }
8628 .cm-s-ipython span.cm-meta {
8629 color: #AA22FF;
8594 .cm-s-ipython span.cm-attribute {
8595 color: #00c;
8596 }
8597 .cm-s-ipython span.cm-header {
8598 color: blue;
8599 }
8600 .cm-s-ipython span.cm-quote {
8601 color: #090;
8602 }
8603 .cm-s-ipython span.cm-link {
8604 color: #00c;
8605 }
8606 .cm-s-ipython span.cm-error {
8607 color: #f00;
8630 8608 }
8631 8609 .cm-s-ipython span.cm-tab {
8632 8610 background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=);
General Comments 0
You need to be logged in to leave comments. Login now