Permalink
Browse files

Bug 752845 - Non-alphanumeric characters in Markdown links don't work…

… properly
  • Loading branch information...
Dimitri van Heesch
Dimitri van Heesch committed Dec 28, 2015
1 parent 205f733 commit e89eb77b14810649c679dc7d377ddb4e6a942d82
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/markdown.cpp
@@ -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;
}

0 comments on commit e89eb77

Please sign in to comment.