Skip to content

Commit

Permalink
Bug 752845 - Non-alphanumeric characters in Markdown links don't work…
Browse files Browse the repository at this point in the history
… properly
  • Loading branch information
Dimitri van Heesch committed Dec 28, 2015
1 parent 205f733 commit e89eb77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/markdown.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,8 +589,8 @@ static int processHtmlTag(GrowBuf &out,const char *data,int offset,int size)
static int processEmphasis(GrowBuf &out,const char *data,int offset,int size)
{
if ((offset>0 && !isOpenEmphChar(-1)) || // invalid char before * or _
(size>1 && data[0]!=data[1] && !isIdChar(1)) || // invalid char after * or _
(size>2 && data[0]==data[1] && !isIdChar(2))) // invalid char after ** or __
(size>1 && data[0]!=data[1] && !(isIdChar(1) || data[1]=='[')) || // invalid char after * or _
(size>2 && data[0]==data[1] && !(isIdChar(2) || data[2]=='['))) // invalid char after ** or __
{
return 0;
}
Expand Down

0 comments on commit e89eb77

Please sign in to comment.