diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-02-12 02:38:47 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-02-12 02:38:47 +0900 |
| commit | e19899962edfa9005e1f8fdbc56b1c8e7982864c (patch) | |
| tree | 2d034dbf6cfbce48e01760a09230735dbf5c9841 /src/web/app | |
| parent | [Client] Use JSON for API requests (diff) | |
| download | sharkey-e19899962edfa9005e1f8fdbc56b1c8e7982864c.tar.gz sharkey-e19899962edfa9005e1f8fdbc56b1c8e7982864c.tar.bz2 sharkey-e19899962edfa9005e1f8fdbc56b1c8e7982864c.zip | |
インラインのコードでもシンタックスハイライトを有効化
Diffstat (limited to 'src/web/app')
| -rw-r--r-- | src/web/app/base.styl | 72 | ||||
| -rw-r--r-- | src/web/app/common/scripts/text-compiler.js | 4 |
2 files changed, 38 insertions, 38 deletions
diff --git a/src/web/app/base.styl b/src/web/app/base.styl index 334ef91f76..c35f66c9a5 100644 --- a/src/web/app/base.styl +++ b/src/web/app/base.styl @@ -110,54 +110,54 @@ a code font-family Consolas, 'Courier New', Courier, Monaco, monospace -pre - display block + .comment + opacity 0.5 - > code - display block - overflow auto - tab-size 2 + .string + color #e96900 - .comment - opacity 0.5 + .regexp + color #e9003f - .string - color #e96900 + .keyword + color #2973b7 - .regexp - color #e9003f + &.true + &.false + &.null + &.nil + &.undefined + color #ae81ff - .keyword - color #2973b7 + .symbol + color #42b983 - &.true - &.false - &.null - &.nil - &.undefined - color #ae81ff + .number + .nan + color #ae81ff - .symbol - color #42b983 + .var:not(.keyword) + font-weight bold + font-style italic + //text-decoration underline - .number - .nan - color #ae81ff + .method + font-style italic + color #8964c1 - .var:not(.keyword) - font-weight bold - font-style italic - //text-decoration underline + .property + color #a71d5d - .method - font-style italic - color #8964c1 + .label + color #e9003f - .property - color #a71d5d +pre + display block - .label - color #e9003f + > code + display block + overflow auto + tab-size 2 mk-locker display block diff --git a/src/web/app/common/scripts/text-compiler.js b/src/web/app/common/scripts/text-compiler.js index f47ce0f3c3..62e70463ad 100644 --- a/src/web/app/common/scripts/text-compiler.js +++ b/src/web/app/common/scripts/text-compiler.js @@ -31,9 +31,9 @@ module.exports = function(tokens, shouldBreak, shouldEscape) { case 'hashtag': // TODO return '<a>' + escape(token.content) + '</a>'; case 'code': - return '<pre><code>' + token.codeHtml + '</code></pre>'; + return '<pre><code>' + token.html + '</code></pre>'; case 'inline-code': - return '<code>' + escape(token.code) + '</code>'; + return '<code>' + token.html + '</code>'; } }).join(''); |