From e10203b7e9bb407fceee1f176dc8ff36b59a4acd Mon Sep 17 00:00:00 2001 From: Yukai Huang Date: Mon, 10 Oct 2016 08:24:58 +0800 Subject: More function expose workaround for reveal-markdown.js --- package.json | 2 ++ public/js/extra.js | 2 ++ public/js/render.js | 1 + 3 files changed, 5 insertions(+) diff --git a/package.json b/package.json index d02ab36f..52f646e6 100644 --- a/package.json +++ b/package.json @@ -124,6 +124,8 @@ "file-loader": "^0.9.0", "imports-loader": "^0.6.5", "json-loader": "^0.5.4", + "less": "^2.7.1", + "less-loader": "^2.2.3", "style-loader": "^0.13.1", "url-loader": "^0.5.7", "webpack": "^1.13.2" diff --git a/public/js/extra.js b/public/js/extra.js index d4a6c5cd..4ec7e80f 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -442,6 +442,7 @@ function postProcess(code) { } return result; } +window.postProcess = postProcess; function generateCleanHTML(view) { var src = view.clone(); @@ -811,6 +812,7 @@ var md = markdownit('default', { typographer: true, highlight: highlightRender }); +window.md = md; md.use(require('markdown-it-abbr')); md.use(require('markdown-it-footnote')); diff --git a/public/js/render.js b/public/js/render.js index 41b367a3..77778795 100644 --- a/public/js/render.js +++ b/public/js/render.js @@ -51,6 +51,7 @@ var filterXSSOptions = { function preventXSS(html) { return filterXSS(html, filterXSSOptions); } +window.preventXSS = preventXSS; module.exports = { preventXSS: preventXSS -- cgit v1.2.3