bump: 2.0.3

This commit is contained in:
qingwei.li 2017-02-07 20:18:25 +08:00
parent 8cd386ae49
commit 7ba434e61d
3 changed files with 15 additions and 11 deletions

View File

@ -1,6 +1,6 @@
![logo](_media/icon.svg)
# docsify <small>2.0.2</small>
# docsify <small>2.0.3</small>
> A magical documentation site generator.

View File

@ -170,6 +170,7 @@ var merge = Object.assign || function (to) {
function emojify (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(/__colon__/g, ':')
}
@ -2509,14 +2510,17 @@ function cssVars () {
if (block.nodeName === 'STYLE') {
replaceVar(block);
} else if (block.nodeName === 'LINK') {
load(block.getAttribute('href'))
.then(function (res) {
var style = document.createElement('style');
var href = block.getAttribute('href');
style.innerHTML = res;
document.head.appendChild(style);
replaceVar(style);
});
if (!/\.css$/.test(href)) { return }
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);
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) {
if (!/:/.test(href)) {

4
lib/docsify.min.js vendored

File diff suppressed because one or more lines are too long