5 ms·
Seems like Markdown could be rendered 1-3 lines at a time, depending on line-height. It isn't like other formats where formatting information is spread all over
by torstenvl 4y ago
Seems like Markdown could be rendered 1-3 lines at a time, depending on line-height. It isn't like other formats where formatting information is spread all over the place.
- eyelidlessness 4y agoType two backticks, everything below is fine. Type one more… the entire rest of the syntax tree is potentially a new tree. Backspace, do the whole thing again.
- worthless-trash 4y agoBehavior solvable. When a user inserts to backticks, insert the closing backticks immediately.
- eyelidlessness 4y agoThat solves your problem but probably doesn’t solve the user’s.
- MauranKilom 4y agoCool, now explain how to do it for backspace. And now explain how anyone can ever turn existing text into a code block if every user action is "modified" to not turn existing text into a code block.
- worthless-trash 4y agoThis may be obvious but if you're trashing the second pair of backticks you obviously want the rest of it to be inside the backticks which required the first re-render so its not a mistake, the user made the request , follow through, render till the next set of bacticks into a block.. no trailing backticks ? Render everything.. thats the choice the user made. > And now explain how anyone can ever turn existing text into a code block if every user action is "modified" to not turn existing text into a code block. At no point did I mention that you couldnt wrap code in bacticks, I simply said the default insert would NOT have single pair backticks opening up to a forced re-render of every trailing element.