diff --git a/CHANGELOG.md b/CHANGELOG.md index 67c3fba..1733685 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.10.0 +### Features +- Support emoji :laughing: + ## 1.9.0 ### Bug fixes diff --git a/docs/_coverpage.md b/docs/_coverpage.md index 32859b5..043291a 100644 --- a/docs/_coverpage.md +++ b/docs/_coverpage.md @@ -1,6 +1,6 @@ ![logo](_media/icon.svg) -# docsify 1.9.0 +# docsify 1.10.0 > A magical documentation site generator. diff --git a/lib/docsify.js b/lib/docsify.js index 79262f9..4561ff9 100644 --- a/lib/docsify.js +++ b/lib/docsify.js @@ -2528,6 +2528,10 @@ function init (options) { return ("

" + text + "

") }; + renderer.text = function (text) { + return text.replace(/:(\S*?):/ig, '$1') + }; + if (typeof OPTIONS$1.markdown === 'function') { markdown.setOptions({ renderer: renderer }); markdown = OPTIONS$1.markdown.call(this, markdown); diff --git a/lib/docsify.min.js b/lib/docsify.min.js index 65859bb..1186207 100644 --- a/lib/docsify.min.js +++ b/lib/docsify.min.js @@ -1,2 +1,2 @@ -var Docsify=function(){"use strict";function e(e,t,n){void 0===t&&(t="GET");var r=new XMLHttpRequest;return r.open(t,e),r.send(),{then:function(e,t){if(void 0===t&&(t=function(){}),n){var a=setInterval(function(e){return n({step:Math.floor(5*Math.random()+1)})},500);r.addEventListener("progress",n),r.addEventListener("loadend",function(e){n(e),clearInterval(a)})}r.addEventListener("error",t),r.addEventListener("load",function(n){var r=n.target;r.status>=400?t(r):e(r.response)})},abort:function(){return 4!==r.readyState&&r.abort()}}}function t(e,t){var n=[],r={};return e.forEach(function(e){var a=e.level||1,i=a-1;a>t||(r[i]?(r[i].children=r[i].children||[],r[i].children.push(e)):n.push(e),r[a]=e)}),n}function n(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}function r(e){return null===e||void 0===e}function a(){var e=window.location;if(A===e.hash&&!r(E))return E;var t=e.hash.match(/^#\/([^#]+)/);return t=t&&2===t.length?t[1]:/^#\//.test(e.hash)?"":e.pathname,E=t,A=e.hash,t}function i(){return document.body.clientWidth<=600}function s(e){var t=/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,.\/:;<=>?@\[\]^`{|}~]/g,n=!1,r="-";if(s.occurrences=s.occurrences||{},"string"!=typeof e)return"";n||(e=e.toLowerCase());var a=e.trim().replace(/<[^>\d]+>/g,"").replace(t,"").replace(/\s/g,r).replace(/-+/g,r).replace(/^(\d)/,"_$1"),i=s.occurrences[a];return s.occurrences.hasOwnProperty(a)?i++:i=0,s.occurrences[a]=i,i&&(a=a+"-"+i),a}function o(){function e(){for(var e,r=document.body.scrollTop,i=0,s=n.length;ir){e||(e=l);break}e=l}if(e){var c=a[e.getAttribute("data-id")];c&&c!==o&&(o&&o.classList.remove("active"),c.classList.add("active"),o=c,!t&&!d.noSticky&&o.scrollIntoView(!1))}}if(!i()){for(var t=!1,n=document.querySelectorAll(".anchor"),r=document.querySelector("aside.sidebar"),a={},s=r.querySelectorAll("li"),o=r.querySelector("li.active"),l=0,c=s.length;l=e||d.dom.classList.contains("hidden")?(document.body.classList.add("sticky"),d.noSticky=!1):(document.body.classList.remove("sticky"),d.noSticky=!0)}()}function g(e,t){return t={exports:{}},e(t,t.exports),t.exports}function h(e){return e?(/\/\//.test(e)||(e="https://github.com/"+e),e=e.replace(/^git\+/,""),'\n \n \n '):""}function f(e){var t=e+'';return(i()?t+"
":"
"+t)+'
\n
\n
\n
'}function m(){var e=", 100%, 85%",t="linear-gradient(to left bottom, hsl("+(Math.floor(255*Math.random())+e)+") 0%, hsl("+(Math.floor(255*Math.random())+e)+") 100%)";return'
\n
\n
\n
'}function b(){return''}function v(e,t){return void 0===t&&(t=""),e&&e.length?(e.forEach(function(e){t+='
  • '+e.title+"
  • ",e.children&&(t+='
    • '+v(e.children)+"
    ")}),t):""}function y(e,t){return'

    '+t.slice(5).trim()+"

    "}function k(e){N=e;var t=new O.Renderer;t.heading=function(e,t){var n=s(e),r="";return N.router&&(r="#/"+a()),I.push({level:t,slug:r+"#"+encodeURIComponent(n),title:e}),"'+e+""},t.code=function(e,t){void 0===t&&(t="");var n=M.highlight(e,M.languages[t]||M.languages.markup);return'
    '+n+"
    "},t.link=function(e,t,n){return N.router&&!/:/.test(e)&&(e=("#/"+e).replace(/\/\//g,"/")),''+n+""},t.paragraph=function(e){return/^!>/.test(e)?y("tip",e):/^\?>/.test(e)?y("warn",e):"

    "+e+"

    "},"function"==typeof N.markdown?(P.setOptions({renderer:t}),P=N.markdown.call(this,P)):P.setOptions(T({renderer:t},N.markdown))}function w(e,t){var n=document.querySelector("nav")||document.createElement("nav");N.repo||n.classList.add("no-badge"),e[t?"outerHTML":"innerHTML"]=h(N.repo)+(N.coverpage?m():"")+f(N.sidebarToggle?b():""),document.body.insertBefore(n,document.body.children[0]),u("button.sidebar-toggle"),N.coverpage?!i()&&window.addEventListener("scroll",d):document.body.classList.add("sticky")}function x(e){if(W("article",e?P(e):"not found"),N.sidebar||N.loadSidebar||S(),e&&"undefined"!=typeof Vue){var t=e.match("]*?>([^<]+)");t&&document.body.querySelector("article script").remove(),F.vm&&F.vm.$destroy(),F.vm=t?new Function("return "+t[1].trim())():new Vue({el:"main"}),F.vm&&F.vm.$nextTick(function(e){return o()})}N.auto2top&&setTimeout(function(){return p(N.auto2top)},0)}function L(e){F.navbar&&F.navbar===e||(F.navbar=e,e&&W("nav",P(e)),c("nav"))}function S(e){var n;e?(n=P(e),n=n.match(/]*>([\s\S]+)<\/ul>/g)[0]):n=N.sidebar?v(N.sidebar,"