Skip to content

Commit

Permalink
only remove enclosing angle brackets
Browse files Browse the repository at this point in the history
  • Loading branch information
davidszotten committed Sep 19, 2015
1 parent 4638c60 commit 030392d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/document.c
Original file line number Diff line number Diff line change
Expand Up @@ -1199,8 +1199,10 @@ char_link(hoedown_buffer *ob, hoedown_document *doc, uint8_t *data, size_t offse
link_e--;

/* remove optional angle brackets around the link */
if (data[link_b] == '<') link_b++;
if (data[link_e - 1] == '>') link_e--;
if (data[link_b] == '<' && data[link_e - 1] == '>') {
link_b++;
link_e--;
}

/* building escaped link and title */
if (link_e > link_b) {
Expand Down

0 comments on commit 030392d

Please sign in to comment.