Skip to content

Commit

Permalink
trying to get redirects to work
Browse files Browse the repository at this point in the history
  • Loading branch information
perrygovier committed May 31, 2019
1 parent 2d24aef commit a078187
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ android-template/app/app.iml
*.js
*.json
/site/.env
/site/.firebase
13 changes: 13 additions & 0 deletions site/firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@
}
]
}
],
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"redirects": [
{
"source": "/docs/basics/cordova",
"destination": "/cordova/using-cordova-plugins",
"type": 301
},
{
"source": "/docs/getting-started/pwa-elements/",
"destination": "/docs/web/pwa-elements/",
"type": 301
}
]
}
}
8 changes: 5 additions & 3 deletions site/scripts/markdown-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,11 @@ function collectHeadingMetadata(renderer, metadata) {
exports.collectHeadingMetadata = collectHeadingMetadata;
function changeCodeCreation(renderer) {
function highlight(code, lang) {
code = code.replace(/&/g, "&")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;");
if (lang === 'html' || lang === 'xml') {
code = code.replace(/&/g, "&amp;")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;");
}
if (lang != null && languages.indexOf(lang) !== -1) {
return prismjs_1.default.highlight(code, prismjs_1.default.languages[lang]);
}
Expand Down

0 comments on commit a078187

Please sign in to comment.