Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Only apply NO_INTRA_EMPHASIS to underscores.
This allows asterisk emphasis within words (un*frickin*believable)
while still allowing words_with_underscores.
  • Loading branch information
andre-d authored and spladug committed Jan 2, 2012
1 parent 85605fb commit 6b8f5c0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/markdown.c
Expand Up @@ -498,8 +498,7 @@ parse_emph1(struct buf *ob, struct sd_markdown *rndr, uint8_t *data, size_t size
if (i >= size) return 0;

if (data[i] == c && !_isspace(data[i - 1])) {

if (rndr->ext_flags & MKDEXT_NO_INTRA_EMPHASIS) {
if ((rndr->ext_flags & MKDEXT_NO_INTRA_EMPHASIS) && (c == '_')) {
if (!(i + 1 == size || _isspace(data[i + 1]) || ispunct(data[i + 1])))
continue;
}
Expand Down

0 comments on commit 6b8f5c0

Please sign in to comment.