Remove custom strikethrough in preparation of po5's markdown security fix - #30
Remove custom strikethrough in preparation of po5's markdown security fix#30xEobardThawne wants to merge 2 commits into
Conversation
|
I should probably add that I use Firefox, not Google Chrome. I don't think there would be much of a difference, but just in case it might be useful to know. |
|
I explain why this was added (not supported in marked.js at the time) and why it's no longer necessary (feature is now built into marked.js) in this commit message po5@5f7346e
There are lots of nasty issues with the Markdown handling, and some features (e.g. https://github.com/rr-/szurubooru/issues/542) don't work properly (replacing I'm not satisfied with the approach I took even if it's a lot more robust, which is why I haven't submitted a PR upstream yet. Maybe this will give you some inspiration. https://github.com/po5/szurubooru/tree/markdown-giorgi It has fixes for linking to tags that contain spaces, which it seems @liamw1 has an interest in supporting given 9613158. |
Back when I first coded descriptions, before they were fully implemented (thanks for adding and improving them btw), I was adding descriptions to my posts, which sometimes included the tilde (~) key. I quickly realized that a custom markdown feature was added using the tilde to make strikethroughs. This would be fine, if it wasn't so buggy. Normally you'd expect a feature like that to be cancel-able by adding a backslash (\) key before the tilde. Well I tried doing that, to find out that while it worked, it didn't actually remove the backslashes for some reason? Today, I looked into it further, and found out that the previous developer had added a piece of code to stop backslashes from being removed. Turns out when you remove that code, it just stops the backslashes from doing anything at all, and it deletes them. So basically, the backslashes either work and stay in the text, or they do literally nothing and get removed from the text regardless.
This mess of a feature has led me to the conclusion that it would be best if it was removed all together, especially when
there's something else that does the exact same thing.it would just be readded in a better way in future versions.Also check out @po5's comment down below.