-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Formatting bug #93
Comments
I think I found the root of the bug. Here's a small example:
After
The problem seems to be in the getSourceIndentation function of the file It seems that the fix is too add the line
right before the while loop. I ran the version of metamath with the fix on set.mm, and the only affected lines are the ones with proofs with broken indentation, so it seems that the fix doesn't do any harm. Formatting is a delicate subject, so I would be glad to hear opinions of other metamath-exe contributors (maybe @digama0 or @wlammen can take a look?). |
I think one can unconditionally step back one character, so you are on the p of the $p (if this is the keyword), no matter what character is following |
I am not going to add a PR on my behalf, before #100 is finished, and that project seems to have ground to a standstill already at the second step. |
@benjub I have my another PR stuck in the queue (about minimization), so I'll wait till it is resolved. |
As noticed in metamath/set.mm#2689 (comment), it looks like in some cases (but not all) when a $p-statement is written with
$p
ending a line (hence the next line begins with|-
), then the proof is not indented (see currently ~eucalg in set.mm, but notice that e.g. ~stirlinglem5's proof is correctly indented).The text was updated successfully, but these errors were encountered: