Fixes issues with cleaning broken Markdown blocks and reduce words to…#142
Fixes issues with cleaning broken Markdown blocks and reduce words to…#142
Conversation
… lines BBob updated to form tree by word instead of linebreak. Reconstructs consecutive strings to form lines so that line break plugin operates properly
MShultz
left a comment
There was a problem hiding this comment.
Do we have any concerns for this added processing step on larger posts?
It could take quite a bit of added time since the code in its current form is doing repetitive string concatenation and building a new array before splicing it in place. It might be better to do the whole operation in place using only moving window indices to avoid new array/string creation, but my brain was pretty fried by the time I found this bug. Feel free to make a change or let me know if you feel it would be worth it. |
|
I've updated the function to use a moving index window to minimize string concatenation and array sizing. Should be better, but haven't performed any benchmarking to confirm. |
… lines
BBob updated to form tree by word instead of linebreak. Reconstructs consecutive strings to form lines so that line break plugin operates properly.
Before:

After:
