bump 1.10.1
This commit is contained in:
parent
11f77cd434
commit
bda1b76ba5
2 changed files with 13 additions and 7 deletions
|
|
@ -168,6 +168,12 @@ var merge = Object.assign || function (to) {
|
|||
return to
|
||||
};
|
||||
|
||||
function emojify (text) {
|
||||
return text
|
||||
.replace(/:(\S*?):/ig, '<img class="emoji" src="https://assets-cdn.github.com/images/icons/emoji/$1.png" alt="$1" />')
|
||||
.replace(/__colon__/g, ':')
|
||||
}
|
||||
|
||||
/**
|
||||
* Active sidebar when scroll
|
||||
* @link https://buble.surge.sh/
|
||||
|
|
@ -2510,7 +2516,7 @@ function init (options) {
|
|||
|
||||
var hl = prism.highlight(code, prism.languages[lang] || prism.languages.markup);
|
||||
|
||||
return ("<pre v-pre data-lang=\"" + lang + "\"><code class=\"lang-" + lang + "\">" + hl + "</code></pre>")
|
||||
return ("<pre v-pre data-lang=\"" + lang + "\"><code class=\"lang-" + lang + "\">" + (hl.replace(/:/g, '__colon__')) + "</code></pre>")
|
||||
};
|
||||
renderer.link = function (href, title, text) {
|
||||
if (OPTIONS$1.router && !/:/.test(href)) {
|
||||
|
|
@ -2528,16 +2534,16 @@ function init (options) {
|
|||
return ("<p>" + text + "</p>")
|
||||
};
|
||||
|
||||
renderer.text = function (text) {
|
||||
return text.replace(/:(\S*?):/ig, '<img class="emoji" src="https://assets-cdn.github.com/images/icons/emoji/$1.png" alt="$1" />')
|
||||
};
|
||||
|
||||
if (typeof OPTIONS$1.markdown === 'function') {
|
||||
markdown.setOptions({ renderer: renderer });
|
||||
markdown = OPTIONS$1.markdown.call(this, markdown);
|
||||
} else {
|
||||
markdown.setOptions(merge({ renderer: renderer }, OPTIONS$1.markdown));
|
||||
}
|
||||
|
||||
var md = markdown;
|
||||
|
||||
markdown = function (text) { return emojify(md(text)); };
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
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