From 768f319d3254ced601c296fd65a6abf892df423d Mon Sep 17 00:00:00 2001 From: Omar Khan Date: Thu, 3 Dec 2015 14:22:30 +0700 Subject: [PATCH] Upgrade highlight.js to version 9.0.0 --- package.json | 2 +- resources/github.css | 149 ++++++++++++++++--------------------------- 2 files changed, 57 insertions(+), 94 deletions(-) diff --git a/package.json b/package.json index 38762ff..b827893 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "dependencies": { "commander": "~2.1.0", "debug": "^2.1.1", - "highlight.js": "~7.3.0", + "highlight.js": "~9.0.0", "js-yaml": "2.1.0", "marked": "~0.2.9", "mustache": "0.7.0", diff --git a/resources/github.css b/resources/github.css index 3d00d4e..791932b 100644 --- a/resources/github.css +++ b/resources/github.css @@ -1,136 +1,99 @@ /* -github.com style (c) Vasily Polovnyov -*/ -code, pre { - border: 1px solid #ddd; - border-radius: 3px; - overflow: auto; - padding: 6px 10px; -} +github.com style (c) Vasily Polovnyov -code { - padding: 0 5px; -} +*/ -pre>code { - margin: 0; padding: 0; - border: none; - background: transparent; +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + color: #333; + background: #f8f8f8; } -pre .comment, -pre .template_comment, -pre .diff .header, -pre .javadoc { +.hljs-comment, +.hljs-quote { color: #998; - font-style: italic + font-style: italic; } -pre .keyword, -pre .css .rule .keyword, -pre .winutils, -pre .javascript .title, -pre .nginx .title, -pre .subst, -pre .request, -pre .status { +.hljs-keyword, +.hljs-selector-tag, +.hljs-subst { color: #333; - font-weight: bold + font-weight: bold; } -pre .number, -pre .hexcolor, -pre .ruby .constant { - color: #099; +.hljs-number, +.hljs-literal, +.hljs-variable, +.hljs-template-variable, +.hljs-tag .hljs-attr { + color: #008080; } -pre .string, -pre .tag .value, -pre .phpdoc, -pre .tex .formula { - color: #d14 +.hljs-string, +.hljs-doctag { + color: #d14; } -pre .title, -pre .id { +.hljs-title, +.hljs-section, +.hljs-selector-id { color: #900; - font-weight: bold + font-weight: bold; } -pre .javascript .title, -pre .lisp .title, -pre .clojure .title, -pre .subst { - font-weight: normal +.hljs-subst { + font-weight: normal; } -pre .class .title, -pre .haskell .type, -pre .vhdl .literal, -pre .tex .command { +.hljs-type, +.hljs-class .hljs-title { color: #458; - font-weight: bold + font-weight: bold; } -pre .tag, -pre .tag .title, -pre .rules .property, -pre .django .tag .keyword { +.hljs-tag, +.hljs-name, +.hljs-attribute { color: #000080; - font-weight: normal -} - -pre .attribute, -pre .variable, -pre .lisp .body { - color: #008080 + font-weight: normal; } -pre .regexp { - color: #009926 -} - -pre .class { - color: #458; - font-weight: bold +.hljs-regexp, +.hljs-link { + color: #009926; } -pre .symbol, -pre .ruby .symbol .string, -pre .lisp .keyword, -pre .tex .special, -pre .prompt { - color: #990073 +.hljs-symbol, +.hljs-bullet { + color: #990073; } -pre .built_in, -pre .lisp .title, -pre .clojure .built_in { - color: #0086b3 +.hljs-built_in, +.hljs-builtin-name { + color: #0086b3; } -pre .preprocessor, -pre .pi, -pre .doctype, -pre .shebang, -pre .cdata { +.hljs-meta { color: #999; - font-weight: bold + font-weight: bold; } -pre .deletion { - background: #fdd +.hljs-deletion { + background: #fdd; } -pre .addition { - background: #dfd +.hljs-addition { + background: #dfd; } -pre .diff .change { - background: #0086b3 +.hljs-emphasis { + font-style: italic; } -pre .chunk { - color: #aaa +.hljs-strong { + font-weight: bold; }