diff --git a/src/common/text/elements/code.js b/src/common/text/elements/code.js
index d62801e27f..4d6a6bbb83 100644
--- a/src/common/text/elements/code.js
+++ b/src/common/text/elements/code.js
@@ -188,6 +188,16 @@ const elements = [
};
},
+ // label
+ code => {
+ if (code[0] != '@') return null;
+ const label = code.match(/^@([a-zA-Z_-]+?)\n/)[0];
+ return {
+ html: `${label}`,
+ next: label.length
+ };
+ },
+
// extract vars
(code, i, source, vars) => {
const prev = source[i - 1];
diff --git a/src/web/app/base.styl b/src/web/app/base.styl
index 3b375c2b31..e753a78d50 100644
--- a/src/web/app/base.styl
+++ b/src/web/app/base.styl
@@ -107,46 +107,52 @@ a
*
cursor pointer
-pre > code
- font-family Consolas, 'Courier New', Courier, Monaco, monospace
- tab-size 2
+pre
+ overflow auto
- .comment
- opacity 0.5
+ > code
+ font-family Consolas, 'Courier New', Courier, Monaco, monospace
+ 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
+ .keyword
+ color #2973b7
+
+ &.true
+ &.false
+ &.null
+ &.nil
+ &.undefined
+ color #ae81ff
+
+ .symbol
+ color #42b983
+
+ .number
color #ae81ff
- .symbol
- color #42b983
+ .var:not(.keyword)
+ font-weight bold
+ font-style italic
+ //text-decoration underline
- .number
- 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
-
- .property
- color #a71d5d
+ .label
+ color #e9003f
mk-locker
display block
diff --git a/src/web/app/desktop/tags/timeline-post-sub.tag b/src/web/app/desktop/tags/timeline-post-sub.tag
index 2b12626397..c4907fa9a5 100644
--- a/src/web/app/desktop/tags/timeline-post-sub.tag
+++ b/src/web/app/desktop/tags/timeline-post-sub.tag
@@ -91,9 +91,9 @@
font-size 1.1em
color #717171
-
-
-
+ pre
+ max-height 120px
+ font-size 80%
diff --git a/src/web/app/desktop/tags/timeline-post.tag b/src/web/app/desktop/tags/timeline-post.tag
index be772097e9..7d1516b68f 100644
--- a/src/web/app/desktop/tags/timeline-post.tag
+++ b/src/web/app/desktop/tags/timeline-post.tag
@@ -233,7 +233,6 @@
pre
padding 16px
- overflow auto
font-size 80%
color #525252
background #f8f8f8
diff --git a/src/web/app/mobile/tags/timeline-post-sub.tag b/src/web/app/mobile/tags/timeline-post-sub.tag
index edfeb4e7e6..563f896b7b 100644
--- a/src/web/app/mobile/tags/timeline-post-sub.tag
+++ b/src/web/app/mobile/tags/timeline-post-sub.tag
@@ -91,6 +91,10 @@
font-size 1.1em
color #717171
+ pre
+ max-height 120px
+ font-size 80%
+
diff --git a/src/web/app/mobile/tags/timeline-post.tag b/src/web/app/mobile/tags/timeline-post.tag
index 006136b2e4..7370c9d03a 100644
--- a/src/web/app/mobile/tags/timeline-post.tag
+++ b/src/web/app/mobile/tags/timeline-post.tag
@@ -212,7 +212,6 @@
pre
padding 16px
- overflow auto
font-size 80%
color #525252
background #f8f8f8