Skip to content

Commit

Permalink
+ link favicon
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudcome committed Jan 14, 2017
1 parent acb94e2 commit ad73140
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "blear.classes.safe-markdown",
"version": "1.0.11",
"version": "1.0.12",
"description": "Markdown 解析与【安全】渲染,适用于 Node 端",
"scripts": {
"live": "browser-sync start --config bs-config.js",
Expand Down
6 changes: 4 additions & 2 deletions src/index.js
Expand Up @@ -430,11 +430,13 @@ pro[_link] = function () {
var parseRet;

if (!reHash.test(href) && !reJavascript.test(href)) {
if (href.slice(0, 1) !== '/') {
parseRet = url.parse(href);

if (!parseRet.protocol && href.slice(0, 1) !== '/') {
href = '//' + href;
parseRet = url.parse(href);
}

parseRet = url.parse(href);
hostname = parseRet.hostname;
port = parseRet.port;

Expand Down

0 comments on commit ad73140

Please sign in to comment.