Skip to content

Commit

Permalink
Backport Sundown changes
Browse files Browse the repository at this point in the history
  • Loading branch information
vmg committed Dec 4, 2011
1 parent c25bde3 commit a73f490
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions ext/redcarpet/autolink.c
Expand Up @@ -140,10 +140,9 @@ check_domain(uint8_t *data, size_t size)
else if (!isalnum(data[i]) && data[i] != '-') break;
}

if (!isalnum(data[i - 1]) || np == 0)
return 0;

return i;
/* a valid domain needs to have at least a dot.
* that's as far as we get */
return np ? i : 0;
}

size_t
Expand Down
2 changes: 1 addition & 1 deletion sundown

0 comments on commit a73f490

Please sign in to comment.