Ionaru / easy-markdown-editor

EasyMDE: A simple, beautiful, and embeddable JavaScript Markdown editor. Delightful editing for beginners and experts alike. Features built-in autosaving and spell checking.
https://stackblitz.com/edit/easymde
MIT License
2.38k stars 314 forks source link

How to exclude underscore from being interpreted as italics? #482

Open Braintelligence opened 2 years ago

Braintelligence commented 2 years ago

Hello everyone.

So in markdown you can usually remove underscores from being interpreted by passing options such as code-friendly.

I don't want EasyMDE to interpret underscores as possible italic symbols (in my case the actual rendering of the text ignores them anyway), but from the documentation I'm not sure where I can set underscores to be ignored. Can you help me with a hint? Thanks in advance!

fabianwohlfart commented 2 years ago

Did you solve this? I want remove the * from being interpreted.

Braintelligence commented 2 years ago

No, I didn't. Still waiting on help.

Braintelligence commented 2 years ago

@fabianwohlfart Wait, if you mean * for unordered lists you can use this:

unorderedListStyle: "-",

fabianwohlfart commented 2 years ago

@fabianwohlfart Wait, if you mean * for unordered lists you can use this:

unorderedListStyle: "-",

Asteriks also works for italic, not only lists. These »Styles« are the ones which get applied if you use the toolbar buttons. It does not strip away the interpretation of this character.

I opened a new topic here https://github.com/Ionaru/easy-markdown-editor/issues/496

Braintelligence commented 2 years ago

I know that it works for italic; that's precisely why I narrowed the scope for the list style. Typical users will not bother to set an asterisk for unordered lists by themselves if the editor proposes hyphens, so that was good enough for me. Since you didn't provide more details I didn't know that it was about italic and couldn't rule out XY-problems (sometimes it's enough to not get the option, even though interpreting still works). Good luck with your issue.