diff --git a/src/common/text/elements/code.js b/src/common/text/elements/code.js
index 958bbe8d87..bda3816a7b 100644
--- a/src/common/text/elements/code.js
+++ b/src/common/text/elements/code.js
@@ -240,6 +240,33 @@ const elements = [
}
},
+ // method
+ code => {
+ const match = code.match(/^([a-zA-Z_-]+?)\(/);
+ if (!match) return null;
+
+ if (match[1] == '-') return null;
+
+ return {
+ html: `${match[1]}`,
+ next: match[1].length
+ };
+ },
+
+ // property
+ (code, i, source) => {
+ const prev = source[i - 1];
+ if (prev != '.') return null;
+
+ const match = code.match(/^[a-zA-Z_-]+/);
+ if (!match) return null;
+
+ return {
+ html: `${match[0]}`,
+ next: match[0].length
+ };
+ },
+
// symbol
code => {
const match = symbols.filter(s => code[0] == s)[0];
diff --git a/src/web/app/base.styl b/src/web/app/base.styl
index 1e26a9f85c..3b375c2b31 100644
--- a/src/web/app/base.styl
+++ b/src/web/app/base.styl
@@ -141,6 +141,13 @@ pre > code
font-style italic
//text-decoration underline
+ .method
+ font-style italic
+ color #8964c1
+
+ .property
+ color #a71d5d
+
mk-locker
display block
position fixed