Skip to content

Commit

Permalink
Require a space for link titles
Browse files Browse the repository at this point in the history
  • Loading branch information
andre-d committed Jan 27, 2012
1 parent dde042f commit 05f958d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/markdown.c
Expand Up @@ -888,7 +888,8 @@ char_link(struct buf *ob, struct sd_markdown *rndr, uint8_t *data, size_t offset
/* looking for link end: ' " ) */
while (i < size) {
if (data[i] == '\\') i += 2;
else if (data[i] == ')' || data[i] == '\'' || data[i] == '"') break;
else if (data[i] == ')') break;
else if (i >= 1 && _isspace(data[i-1]) && (data[i] == '\'' || data[i] == '"')) break;
else i++;
}

Expand Down

0 comments on commit 05f958d

Please sign in to comment.