withspectrum / draft-js-markdown-plugin

An opinionated DraftJS plugin for supporting Markdown syntax shortcuts
https://markdown-plugin.spectrum.chat/
MIT License
139 stars 42 forks source link

New markdown format can clash with links #79

Open nperichSYKES opened 6 years ago

nperichSYKES commented 6 years ago

URLs often have in them. But using for italic breaks up the link into italic pieces.

For example, copy in the link to the wikipedia GDPR page: https://en.wikipedia.org/wiki/General_Data_Protection_Regulation

I'm not sure how to handle this case. But it basically means I have to turn off automatic markdown support since in my editor copying in links is far more common than using markdown to format.

One option is italic should require a space. But this is not ideal... imagine a document teaching a foreign language that emphasizes parts of the word.

Another option is that it infers the intent of a link from beginning with "http" or "www" and drops out of markdown checking.

Thanks for your work on this fork!

EDIT: I just noticed that an issue about not parsing pastes was originally about links. Just keeping this around since you might type a link as well as paste one, in which case the problem remains.

mxstbr commented 6 years ago

Yeah true—we should probably make sure the first markdown delimiter is after a word boundary or something.