Upgrade highlight.js

Also adds swift support

Closes #69
This commit is contained in:
John Crepezzi 2016-09-12 20:10:15 -04:00
parent 3178676fba
commit af9a71549b
5 changed files with 60 additions and 74 deletions

View file

@ -166,9 +166,10 @@ haste.extensionMap = {
rb: 'ruby', py: 'python', pl: 'perl', php: 'php', scala: 'scala', go: 'go', rb: 'ruby', py: 'python', pl: 'perl', php: 'php', scala: 'scala', go: 'go',
xml: 'xml', html: 'xml', htm: 'xml', css: 'css', js: 'javascript', vbs: 'vbscript', xml: 'xml', html: 'xml', htm: 'xml', css: 'css', js: 'javascript', vbs: 'vbscript',
lua: 'lua', pas: 'delphi', java: 'java', cpp: 'cpp', cc: 'cpp', m: 'objectivec', lua: 'lua', pas: 'delphi', java: 'java', cpp: 'cpp', cc: 'cpp', m: 'objectivec',
vala: 'vala', cs: 'cs', sql: 'sql', sm: 'smalltalk', lisp: 'lisp', ini: 'ini', vala: 'vala', sql: 'sql', sm: 'smalltalk', lisp: 'lisp', ini: 'ini',
diff: 'diff', bash: 'bash', sh: 'bash', tex: 'tex', erl: 'erlang', hs: 'haskell', diff: 'diff', bash: 'bash', sh: 'bash', tex: 'tex', erl: 'erlang', hs: 'haskell',
md: 'markdown', txt: '', coffee: 'coffee', json: 'javascript' md: 'markdown', txt: '', coffee: 'coffee', json: 'javascript',
swift: 'swift'
}; };
// Look up the extension preferred for a type // Look up the extension preferred for a type

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -60,7 +60,7 @@
</div> </div>
<div id="linenos"></div> <div id="linenos"></div>
<pre id="box" style="display:none;" tabindex="0"><code></code></pre> <pre id="box" style="display:none;" class="hljs" tabindex="0"><code></code></pre>
<textarea spellcheck="false" style="display:none;"></textarea> <textarea spellcheck="false" style="display:none;"></textarea>
</body> </body>

View file

@ -4,97 +4,81 @@ Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmai
*/ */
pre code { .hljs {
display: block; padding: 0.5em; display: block;
background: #002b36; color: #92a0a0; overflow-x: auto;
padding: 0.5em;
background: #002b36;
color: #839496;
} }
pre .comment, .hljs-comment,
pre .template_comment, .hljs-quote {
pre .diff .header,
pre .doctype,
pre .lisp .string,
pre .javadoc {
color: #586e75; color: #586e75;
font-style: italic;
display: inline-block;
line-height: 1em;
} }
pre .keyword, /* Solarized Green */
pre .css .rule .keyword, .hljs-keyword,
pre .winutils, .hljs-selector-tag,
pre .javascript .title, .hljs-addition {
pre .method,
pre .addition,
pre .css .tag,
pre .lisp .title {
color: #859900; color: #859900;
} }
pre .number, /* Solarized Cyan */
pre .command, .hljs-number,
pre .string, .hljs-string,
pre .tag .value, .hljs-meta .hljs-meta-string,
pre .phpdoc, .hljs-literal,
pre .tex .formula, .hljs-doctag,
pre .regexp, .hljs-regexp {
pre .hexcolor {
color: #2aa198; color: #2aa198;
} }
pre .title, /* Solarized Blue */
pre .localvars, .hljs-title,
pre .function .title, .hljs-section,
pre .chunk, .hljs-name,
pre .decorator, .hljs-selector-id,
pre .builtin, .hljs-selector-class {
pre .built_in,
pre .lisp .title,
pre .identifier,
pre .title .keymethods,
pre .id,
pre .header {
color: #268bd2; color: #268bd2;
} }
pre .tag .title, /* Solarized Yellow */
pre .rules .property, .hljs-attribute,
pre .django .tag .keyword { .hljs-attr,
font-weight: bold; .hljs-variable,
} .hljs-template-variable,
.hljs-class .hljs-title,
pre .attribute, .hljs-type {
pre .variable,
pre .instancevar,
pre .lisp .body,
pre .smalltalk .number,
pre .constant,
pre .class .title,
pre .parent,
pre .haskell .label {
color: #b58900; color: #b58900;
} }
pre .preprocessor, /* Solarized Orange */
pre .pi, .hljs-symbol,
pre .shebang, .hljs-bullet,
pre .symbol, .hljs-subst,
pre .diff .change, .hljs-meta,
pre .special, .hljs-meta .hljs-keyword,
pre .keymethods, .hljs-selector-attr,
pre .attr_selector, .hljs-selector-pseudo,
pre .important, .hljs-link {
pre .subst,
pre .cdata {
color: #cb4b16; color: #cb4b16;
} }
pre .deletion { /* Solarized Red */
.hljs-built_in,
.hljs-deletion {
color: #dc322f; color: #dc322f;
} }
pre .tex .formula, .hljs-formula {
pre .code {
background: #073642; background: #073642;
} }
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}