Closed n-peugnet closed 2 years ago
I just found out this change kind of breaks the "plain text" mode (^L). I'm investigating this right now.
I added a third patch to preserve the whitespace characters at the beginning and end of the codeblocks. I am not sure if it could cause other problems, but it seems to be sensible and I didn't have any issue with my limited testing. It does not affect the plaintext mode though.
This is mostly important for indentation when the first line does not start from the first column:
EDIT: This third patch seems to introduce a crash sometimes.
As I just had a crash with the third commit. I removed it from this pull request (and rebased it by the way) to be able to merge it faster.
Because some tokens can contain newlines and not only comment tokens, I removed the comments specific code to handle newlines in a more generic way.
Before
After
Before
After
Fixes #274 Fixes #213