Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lyricat committed Mar 12, 2019
1 parent 54cec13 commit 675d730
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/assets/default-content.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
使用时,你得把默认的 Markdown 内容换成你自己的内容。

关于本工具的介绍请看[这篇公众号文章](https://mp.weixin.qq.com/s/pn0LzyfgUj6rGUfVHUksjg)


## 一级标题

Expand All @@ -21,7 +23,7 @@

我最大的*爱好*是拆汽车,我拆了很多汽车,宝马、奔驰、劳斯莱斯和特斯拉,但是都没装回去。

上面表现了链接和加重两种样式。
上面表现了链接和加重两种样式,公众号以外的链接会被转换为脚注


### 注音符号
Expand Down
12 changes: 8 additions & 4 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,15 @@
return '<img ' + S(ENV_STETCH_IMAGE ? 'image' : 'image_org') + ' src="' + href + '" title="'+title+'" alt="'+text+'"/>'
}
renderer.link = function (href, title, text) {
if (ENV_USE_REFERENCES) {
var ref = addFootnote(title || text, href)
return '<span ' + S('link') + '>' + text + '<sup>['+ref+']</sup></span>';
if (href.indexOf('https://mp.weixin.qq.com') === 0) {
return '<a href="' + href +'" title="' + (title || text) + '">' + text + '</a>';
} else {
return '<a href="' + href +'" title="' + title + '" ' + S('link') + '>' + text + '</a>';
if (ENV_USE_REFERENCES) {
var ref = addFootnote(title || text, href)
return '<span ' + S('link') + '>' + text + '<sup>['+ref+']</sup></span>';
} else {
return '<a href="' + href +'" title="' + (title || text) + '" ' + S('link') + '>' + text + '</a>';
}
}
}
renderer.strong = renderer.em = function (text) {
Expand Down

0 comments on commit 675d730

Please sign in to comment.