BijoySingh / Scarlet-Notes

[Discontinued and Unsupported Project] Simple yet powerful rich note taking android application, with a lot of flexibilty of usage
https://play.google.com/store/apps/details?id=com.bijoysingh.quicknote
GNU General Public License v3.0
355 stars 94 forks source link

[BUG] [MD] Broken parsing of unclosed Markdown tokens #129

Closed Fs00 closed 5 years ago

Fs00 commented 5 years ago

I discovered a bug in Markdown parsing that appears only in note preview. If a single Markdown token that needs to be closed (asterisk, underscore, backtick) is placed on a line but not closed, is put at the end of it. For example, if I write aa_aa the corresponding preview will be aaaa_. However, if I have two unclosed tokens in a single line the behavior is a bit more tricky: raw text aa_bb*c is previewed as aabb_c*. Basically the second token went to the end of the line, while the first has been put where the second one was.
The same behavior applies also when there are more than 2 tokens on the same line.