diff --git a/lib/core/Head.js b/lib/core/Head.js
index e0f4d4ce4d..e6680de248 100644
--- a/lib/core/Head.js
+++ b/lib/core/Head.js
@@ -71,6 +71,8 @@ class Head extends React.Component {
{includeGithubButton &&
}
+
+
);
}
diff --git a/lib/core/Marked.js b/lib/core/Marked.js
index 2dca40e58f..d22ea5fc75 100644
--- a/lib/core/Marked.js
+++ b/lib/core/Marked.js
@@ -11,8 +11,10 @@
const React = require("react");
import DOM from 'react-dom-factories';
-const Prism = require("./Prism.js");
-const Header = require("./Header.js");
+const Prism = require("./Prism");
+const Header = require("./Header");
+const WebPlayer = require('./WebPlayer');
+const SnackPlayer = require('./SnackPlayer');
/**
* Block-Level Grammar
@@ -816,12 +818,32 @@ Parser.prototype.tok = function() {
);
}
- case "code": {
- return (
-
- {this.token.text}
-
- );
+ case 'code': {
+ const lang = this.token.lang, text = this.token.text;
+
+ if (
+ lang && lang.indexOf('ReactNativeWebPlayer') === 0
+ ) {
+ return (
+
+ {text}
+
+ );
+ }
+
+ if (lang && lang.indexOf('SnackPlayer') === 0) {
+ return (
+
+ {text}
+
+ );
+ }
+
+ if (lang) {
+ return {text};
+ }
+
+ return {text};
}
case "table": {
const table = [];
diff --git a/lib/static/css/main.css b/lib/static/css/main.css
index 6fed10d3df..fa4cfbdb93 100644
--- a/lib/static/css/main.css
+++ b/lib/static/css/main.css
@@ -1993,4 +1993,38 @@ footer .copyright {
.entry-share {
display: none;
}
-}
\ No newline at end of file
+}
+
+
+/** Web player **/
+.web-player > iframe {
+ display: none;
+}
+
+.web-player > .prism {
+ display: none;
+}
+
+.web-player.desktop > iframe {
+ display: block; }
+
+.web-player.mobile > .prism {
+ display: block; }
+
+.token.keyword {
+ color: #1990b8;
+}
+
+.token.string,
+.token.regex {
+ color: #2f9c0a;
+}
+
+.token.boolean,
+.token.number {
+ color: #c92c2c;
+}
+
+.token.comment {
+ color: #7d8b99;
+}