mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
Fix edit page url
This commit is contained in:
parent
42a2cabc7b
commit
c702e12a42
@ -105,7 +105,9 @@
|
|||||||
colorize.push(currentCodeExample);
|
colorize.push(currentCodeExample);
|
||||||
return '<pre id="code' + currentCodeExample + '">' + escapeHTML(code) + '</pre>';
|
return '<pre id="code' + currentCodeExample + '">' + escapeHTML(code) + '</pre>';
|
||||||
} else if (lang === 'mermaid') {
|
} else if (lang === 'mermaid') {
|
||||||
return '<div class="mermaid">' + mermaid.render('mermaid-svg-' + num++, code) + '</div>';
|
return (
|
||||||
|
'<div class="mermaid">' + mermaid.render('mermaid-svg-' + num++, code) + '</div>'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return this.origin.code.apply(this, arguments);
|
return this.origin.code.apply(this, arguments);
|
||||||
},
|
},
|
||||||
@ -120,7 +122,7 @@
|
|||||||
plugins: [
|
plugins: [
|
||||||
function (hook, vm) {
|
function (hook, vm) {
|
||||||
hook.beforeEach(function (html) {
|
hook.beforeEach(function (html) {
|
||||||
url = 'https://github.com/mermaid-js/mermaid/blob/develop/docs/' + vm.route.file;
|
url = 'https://github.com/mermaid-js/mermaid/blob/develop/src/docs/' + vm.route.file;
|
||||||
var editHtml = '[:memo: Edit this Page](' + url + ')\n';
|
var editHtml = '[:memo: Edit this Page](' + url + ')\n';
|
||||||
return editHtml + html;
|
return editHtml + html;
|
||||||
});
|
});
|
||||||
@ -131,7 +133,8 @@
|
|||||||
while (!window.hasOwnProperty('monaco'))
|
while (!window.hasOwnProperty('monaco'))
|
||||||
await new Promise((resolve) => setTimeout(resolve, 1000));
|
await new Promise((resolve) => setTimeout(resolve, 1000));
|
||||||
colorizeEverything(html).then(
|
colorizeEverything(html).then(
|
||||||
(newHTML) => (document.querySelector('article.markdown-section').innerHTML = newHTML)
|
(newHTML) =>
|
||||||
|
(document.querySelector('article.markdown-section').innerHTML = newHTML)
|
||||||
);
|
);
|
||||||
})();
|
})();
|
||||||
});
|
});
|
||||||
|
@ -120,7 +120,7 @@
|
|||||||
plugins: [
|
plugins: [
|
||||||
function (hook, vm) {
|
function (hook, vm) {
|
||||||
hook.beforeEach(function (html) {
|
hook.beforeEach(function (html) {
|
||||||
url = 'https://github.com/mermaid-js/mermaid/blob/develop/docs/' + vm.route.file;
|
url = 'https://github.com/mermaid-js/mermaid/blob/develop/src/docs/' + vm.route.file;
|
||||||
var editHtml = '[:memo: Edit this Page](' + url + ')\n';
|
var editHtml = '[:memo: Edit this Page](' + url + ')\n';
|
||||||
return editHtml + html;
|
return editHtml + html;
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user