Permalink
Browse files

Require a space for link titles

  • Loading branch information...
1 parent dde042f commit 05f958dae6b3f00d2b1566b55b729afe15b225b5 @andre-d andre-d committed Jan 27, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/markdown.c
View
@@ -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++;
}

0 comments on commit 05f958d

Please sign in to comment.