summaryrefslogtreecommitdiff
path: root/src/web
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-02-09 19:41:17 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-02-09 19:41:17 +0900
commit21b72f78546fe8fde457be780c57c5bed6fdb40a (patch)
treed25577bc54ea9ca2bc820b9d323ecff0f68a5bec /src/web
parentMerge pull request #137 from syuilo/greenkeeper/typescript-2.1.6 (diff)
downloadmisskey-21b72f78546fe8fde457be780c57c5bed6fdb40a.tar.gz
misskey-21b72f78546fe8fde457be780c57c5bed6fdb40a.tar.bz2
misskey-21b72f78546fe8fde457be780c57c5bed6fdb40a.zip
#139
Diffstat (limited to 'src/web')
-rw-r--r--src/web/app/base.styl23
-rw-r--r--src/web/app/common/scripts/text-compiler.js2
2 files changed, 24 insertions, 1 deletions
diff --git a/src/web/app/base.styl b/src/web/app/base.styl
index 5eab205480..4082fa24ca 100644
--- a/src/web/app/base.styl
+++ b/src/web/app/base.styl
@@ -107,6 +107,29 @@ a
*
cursor pointer
+pre > code
+ .comment
+ opacity 0.5
+
+ .string
+ color #e96900
+
+ .keyword
+ color #2973b7
+
+ &.true
+ &.false
+ &.null
+ &.nil
+ &.undefined
+ color #ae81ff
+
+ .symbol
+ color #42b983
+
+ .number
+ color #ae81ff
+
mk-locker
display block
position fixed
diff --git a/src/web/app/common/scripts/text-compiler.js b/src/web/app/common/scripts/text-compiler.js
index ab322764f3..29b700e628 100644
--- a/src/web/app/common/scripts/text-compiler.js
+++ b/src/web/app/common/scripts/text-compiler.js
@@ -31,7 +31,7 @@ module.exports = function(tokens, shouldBreak, shouldEscape) {
case 'hashtag': // TODO
return '<a>' + escape(token.content) + '</a>';
case 'code':
- return '<pre><code>' + escape(token.code) + '</code></pre>';
+ return '<pre><code>' + token.codeHtml + '</code></pre>';
}
}).join('');