Permalink
Browse files

Merge pull request #89 from andre-d/requirespace

Require a space for link titles
  • Loading branch information...
2 parents dde042f + 05f958d commit 86a4790c47e1d6e0c71e017d312ff758b610ef69 @vmg vmg 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 86a4790

Please sign in to comment.