Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Require a space for link titles #89

Merged
merged 1 commit into from

2 participants

@andre-d

This fixes a bug we were experiencing where links with quotes in them were breaking where they previously were not. This adds the requirement of a space between the link and the title, as shown in the markdown "spec".

@vmg
Owner

Looking good! Thanks!

@vmg vmg merged commit 86a4790 into vmg:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 27, 2012
  1. @andre-d
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/markdown.c
View
3  src/markdown.c
@@ -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++;
}
Something went wrong with that request. Please try again.