sirthias / pegdown

A pure-Java Markdown processor based on a parboiled PEG parser supporting a number of extensions
http://pegdown.org
Apache License 2.0
1.29k stars 218 forks source link

Rendering escaped dot in e-mail #246

Open ziacik opened 7 years ago

ziacik commented 7 years ago

In PegDown 1.6.0

This pegDownProcessor.markdownToHtml("someemail@gmail\\.com");

does not remove the escaping \, the result is

someemail@gmail.com

This some\.email@gmail.com

is rendered as

some.email@gmail.com

It works OK for non-link text: pegDownProcessor.markdownToHtml("someemailgmail\\.com");

renders as

someemailgmail.com

I'm not sure if this is a bug or the dot in an e-mail is simply expected not to be escaped.

EDIT: the processor is constructed with AUTOLINKS extension included: PegDownProcessor pegDownProcessor = new PegDownProcessor(Extensions.ALL)