bump: 2.0.3
This commit is contained in:
parent
8cd386ae49
commit
7ba434e61d
3 changed files with 15 additions and 11 deletions
|
|
@ -1,6 +1,6 @@
|
||||||

|

|
||||||
|
|
||||||
# docsify <small>2.0.2</small>
|
# docsify <small>2.0.3</small>
|
||||||
|
|
||||||
> A magical documentation site generator.
|
> A magical documentation site generator.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -170,6 +170,7 @@ var merge = Object.assign || function (to) {
|
||||||
|
|
||||||
function emojify (text) {
|
function emojify (text) {
|
||||||
return text
|
return text
|
||||||
|
.replace(/<(pre|template)[^>]*?>([\s\S]+)<\/(pre|template)>/g, function (match) { return match.replace(/:/g, '__colon__'); })
|
||||||
.replace(/:(\w*?):/ig, '<img class="emoji" src="https://assets-cdn.github.com/images/icons/emoji/$1.png" alt="$1" />')
|
.replace(/:(\w*?):/ig, '<img class="emoji" src="https://assets-cdn.github.com/images/icons/emoji/$1.png" alt="$1" />')
|
||||||
.replace(/__colon__/g, ':')
|
.replace(/__colon__/g, ':')
|
||||||
}
|
}
|
||||||
|
|
@ -2509,14 +2510,17 @@ function cssVars () {
|
||||||
if (block.nodeName === 'STYLE') {
|
if (block.nodeName === 'STYLE') {
|
||||||
replaceVar(block);
|
replaceVar(block);
|
||||||
} else if (block.nodeName === 'LINK') {
|
} else if (block.nodeName === 'LINK') {
|
||||||
load(block.getAttribute('href'))
|
var href = block.getAttribute('href');
|
||||||
.then(function (res) {
|
|
||||||
var style = document.createElement('style');
|
|
||||||
|
|
||||||
style.innerHTML = res;
|
if (!/\.css$/.test(href)) { return }
|
||||||
document.head.appendChild(style);
|
|
||||||
replaceVar(style);
|
load(href).then(function (res) {
|
||||||
});
|
var style = document.createElement('style');
|
||||||
|
|
||||||
|
style.innerHTML = res;
|
||||||
|
document.head.appendChild(style);
|
||||||
|
replaceVar(style);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -2557,7 +2561,7 @@ function init () {
|
||||||
|
|
||||||
var hl = prism.highlight(code, prism.languages[lang] || prism.languages.markup);
|
var hl = prism.highlight(code, prism.languages[lang] || prism.languages.markup);
|
||||||
|
|
||||||
return ("<pre v-pre data-lang=\"" + lang + "\"><code class=\"lang-" + lang + "\">" + (hl.replace(/:/g, '__colon__')) + "</code></pre>")
|
return ("<pre v-pre data-lang=\"" + lang + "\"><code class=\"lang-" + lang + "\">" + hl + "</code></pre>")
|
||||||
};
|
};
|
||||||
renderer.link = function (href, title, text) {
|
renderer.link = function (href, title, text) {
|
||||||
if (!/:/.test(href)) {
|
if (!/:/.test(href)) {
|
||||||
|
|
|
||||||
4
lib/docsify.min.js
vendored
4
lib/docsify.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue