-
Notifications
You must be signed in to change notification settings - Fork 100
Comment rewrap specification
This documents how metamath.exe rewraps comments (different from documenting how to rewrap).
It's a little bit faster to not have to rewrap, which requires knowledge of how formatting works:
The following cannot be broken up for rewrapping:
- Math markup
` 1 + 1 = 2 `
- Links
~ ax-1 , ~ https://example.com
- Discouraged tags
(Proof modification is discouraged.)
and(New usage is discouraged.)
Note: This is true for links not because it was coded,
but because of the single tilde rule, no trailing whitespace rule, and that the URLs do not have spaces
metamath.exe will change one space to two spaces after .?!:
when after the space there is a capital letter or opening punctuation (['"
.
- This means
~
(links),`
(math markup),_
(italics),123
(numbers),abc
(lowercase letters), etc. are exceptions:
if the next sentence starts with these, only one space separates it from the previous sentence.
Exception: if the character before a .
is a capital letter, the code assumes it's someone's initials and it's ignored.
Excpetion: p.
(with the space before p
) to keep spacing akin to "page 5".
Characters marking the start of a sentence: a capital letter, or (['"
Characters marking the end of a sentence: .,;:?!)]'"
(when followed by a space)