fix: remove leading space and other minor bugs#40
fix: remove leading space and other minor bugs#40Bubu-Droid wants to merge 1 commit intovEnhance:mainfrom
Conversation
|
Well, since trailing white-spaces shouldn't be intended, should I add another function through which the copied text would pass through at first which would print out the lines (and probably the line numbers) which have trailing white-spaces. Then I'll ask the user to remove them before running the script again. |
|
What does "cause the script to fail" mean? I don't see why we want to remove leading spaces. It's important to note that I think people should be using an editor that trims out all trailing whitespace anyway; AFAIK there is never any reason why any lines in TeX files should have trailing whitespace. I think that's not von's job. I think the changes to \begin{proof}[Proof of lemma]
...
\end{proof}will no longer work. So this also seems to be a regression. |
|
Oof, I'm really sorry. I didn't notice that r"[a-zA-Z.,;—\"–'):$]\n[a-zA-Z$'\"]"the second group doesn't match any white-space characters. Due to some weird reason, I had the newline joining logic (inside I've added an autocmd to strip trailing white-spaces now. Sorry again, I'll close the pull request. |
Leading and trailing white-spaces in the copied TeX code (usually due to indentation) cause the script to fail. We use
lstripto strip the leading white-spaces. But since trailing white-spaces are more likely to be an error on the user's part, we do not remove that and let the script fail there so that the user realizes that their code has some trailing white-space and can fix it manually.Moreover, we usually want the content inside claim to be right beside the title keyword and the QED to be at the end of the same line where the solution ends. Hence the other changes.