diff --git a/lib/renderer.js b/lib/renderer.js index ef26b74..520380c 100644 --- a/lib/renderer.js +++ b/lib/renderer.js @@ -51,7 +51,16 @@ class Renderer extends MarkedRenderer { } } - let out = ` { ].join('\n')); }); + it('shouldn\'t encode when not a valid URL', () => { + const url = 'http://localhost:4000你好'; + + const body = `[foo](${url})`; + + const result = r({text: body}); + + result.should.eql(`

foo

\n`); + }); + describe('autolink option tests', () => { const hexo = new Hexo(__dirname, {silent: true}); const ctx = Object.assign(hexo, {