Skip to content

Commit

Permalink
Improved AutoLinkEmail (Fletcher Penney).
Browse files Browse the repository at this point in the history
  • Loading branch information
John MacFarlane committed Oct 25, 2011
1 parent 5e22125 commit ca4df46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion markdown_parser.leg
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ AutoLink = AutoLinkUrl | AutoLinkEmail
AutoLinkUrl = '<' < [A-Za-z]+ "://" ( !Newline !'>' . )+ > '>'
{ $$ = mk_link(mk_str(yytext), yytext, ""); }

AutoLinkEmail = '<' < [-A-Za-z0-9+_]+ '@' ( !Newline !'>' . )+ > '>'
AutoLinkEmail = '<' ( "mailto:" )? < [-A-Za-z0-9+_./!%~$]+ '@' ( !Newline !'>' . )+ > '>'
{ char *mailto = malloc(strlen(yytext) + 8);
sprintf(mailto, "mailto:%s", yytext);
$$ = mk_link(mk_str(yytext), mailto, "");
Expand Down

0 comments on commit ca4df46

Please sign in to comment.