Skip to content

Commit

Permalink
revert: ":bug: fix error when title of link is null" (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentbel authored May 4, 2020
1 parent 12c847f commit 4f842de
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function visitor(node) {
}

if (is('link', node) || is('image', node) || is('definition', node)) {
node.title = format(node.title || '')
node.title = format(node.title)
}

if (is('image', node) || is('imageReference', node)) {
Expand Down
4 changes: 0 additions & 4 deletions tests/link/__snapshots__/run.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,9 @@ exports[`link.md 1`] = `
[说明a说明1](http://example.com/链接a链接1 "标题a标题1")
[说明b说明2](http://example.com/链接b链接2)
[http://example.com](http://example.com)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[说明 a 说明 1](http://example.com/链接a链接1 "标题 a 标题 1")
[说明 b 说明 2](http://example.com/链接b链接2)
[http://example.com](http://example.com)
`;
2 changes: 0 additions & 2 deletions tests/link/link.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
[说明a说明1](http://example.com/链接a链接1 "标题a标题1")

[说明b说明2](http://example.com/链接b链接2)

[http://example.com](http://example.com)

0 comments on commit 4f842de

Please sign in to comment.