From 82b7b8226de26d7f36b56c26269c2f13766d905f Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Wed, 25 Jan 2017 21:39:12 +0800 Subject: [PATCH 1/3] Fix render emojis again --- CHANGELOG.md | 4 ++++ docs/_coverpage.md | 2 +- src/util.js | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4aa30768..feadcdd93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.10.2 +### Bug fixes +- Fix render emojis again + ## 1.10.1 ### Bug fixes - Fix render emojis diff --git a/docs/_coverpage.md b/docs/_coverpage.md index 043291a7e..766321133 100644 --- a/docs/_coverpage.md +++ b/docs/_coverpage.md @@ -1,6 +1,6 @@ ![logo](_media/icon.svg) -# docsify 1.10.0 +# docsify 1.10.2 > A magical documentation site generator. diff --git a/src/util.js b/src/util.js index 9d42947fa..c57bb42f8 100644 --- a/src/util.js +++ b/src/util.js @@ -160,7 +160,7 @@ export const merge = Object.assign || function (to) { export function emojify (text) { return text - .replace(/:(\S*?):/ig, '$1') + .replace(/:(\w*?):/ig, '$1') .replace(/__colon__/g, ':') } From 00b13c5e86f510302867b4c67d92935f1fbe8a64 Mon Sep 17 00:00:00 2001 From: "qingwei.li" Date: Wed, 25 Jan 2017 21:39:32 +0800 Subject: [PATCH 2/3] bump 1.10.2 --- lib/docsify.js | 2 +- lib/docsify.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/docsify.js b/lib/docsify.js index 128e63793..50a4fd768 100644 --- a/lib/docsify.js +++ b/lib/docsify.js @@ -170,7 +170,7 @@ var merge = Object.assign || function (to) { function emojify (text) { return text - .replace(/:(\S*?):/ig, '$1') + .replace(/:(\w*?):/ig, '$1') .replace(/__colon__/g, ':') } diff --git a/lib/docsify.min.js b/lib/docsify.min.js index ee1f16634..3df5a2b0c 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(q===e.hash&&!r(A))return A;var t=e.hash.match(/^#\/([^#]+)/);return t=t&&2===t.length?t[1]:/^#\//.test(e.hash)?"":e.pathname,A=t,q=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(e){return e.replace(/:(\S*?):/gi,'$1').replace(/__colon__/g,":")}function l(){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&&!g.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||g.dom.classList.contains("hidden")?(document.body.classList.add("sticky"),g.noSticky=!1):(document.body.classList.remove("sticky"),g.noSticky=!0)}()}function h(e,t){return t={exports:{}},e(t,t.exports),t.exports}function f(e){return e?(/\/\//.test(e)||(e="https://github.com/"+e),e=e.replace(/^git\+/,""),'\n \n \n '):""}function m(e){var t=e+'';return(i()?t+"
":"
"+t)+'
\n
\n
\n
'}function b(){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 v(){return''}function y(e,t){return void 0===t&&(t=""),e&&e.length?(e.forEach(function(e){t+='
  • '+e.title+"
  • ",e.children&&(t+='
    • '+y(e.children)+"
    ")}),t):""}function k(e,t){return'

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

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

    "+e+"

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