mirror of
https://github.com/docsifyjs/docsify.git
synced 2025-12-08 19:55:52 +00:00
bump: 2.0.3
This commit is contained in:
parent
8cd386ae49
commit
7ba434e61d
@ -1,6 +1,6 @@
|
||||

|
||||
|
||||
# docsify <small>2.0.2</small>
|
||||
# docsify <small>2.0.3</small>
|
||||
|
||||
> A magical documentation site generator.
|
||||
|
||||
|
||||
@ -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
4
lib/docsify.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user