Skip to content
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

Test and fix verbatim line handling #2129

Merged
merged 4 commits into from
Nov 2, 2024
Merged

Test and fix verbatim line handling #2129

merged 4 commits into from
Nov 2, 2024

Conversation

alerque
Copy link
Member

@alerque alerque commented Oct 8, 2024

Closes #2128

...as of posting all I have is a test that shows its broken.

@alerque alerque added this to the v0.15.6 milestone Oct 8, 2024
@alerque alerque added the bug Software bug issue label Oct 8, 2024
@coveralls
Copy link

coveralls commented Oct 8, 2024

Coverage Status

coverage: 57.928% (+3.7%) from 54.19%
when pulling 73cd72c on verbatim-lines
into 21bcc5c on master.

@Omikhleia
Copy link
Member

Omikhleia commented Oct 9, 2024

Would this meet the expectations? (your test here + an additional check + the autodoc blurb from the manual cited in the issue):

image

If so, I can try to make it neat, perhaps this week-end. (Using a hack currently, but the path from that point seems to be the way to go, if it doesn't break anything else...)

@alerque
Copy link
Member Author

alerque commented Oct 9, 2024

Yes that output looks right. The final test should have as little noise as possible but testing the double line scenario makes sense. Feel Free to push WIP to this branch or PR to target it.

My dev time is total chaos right now. Our son was born last week but had complications and is in the NICU for a while. I'm fiddling with FOSS here and there in waiting rooms to keep time moving.

@Omikhleia
Copy link
Member

Omikhleia commented Oct 10, 2024

Our son was born last week but had complications and is in the NICU for a while.

I'm sincerely sorry to hear about the complications. I can't imagine how hard this must be for you and your wife. I’m keeping you all, and your baby in my thoughts and hoping for a smooth recovery.

Feel Free to push WIP to this branch (...)

Just pushed a few commits on top of yours (the extra 2-line test, fixes to the verbatim/autodoc packages, and the crux of the issue in the typesetter). One test fails (bug-132) -- and it's actually a verbatim-related test, so that seems expected (I just looked at it very quicky, it does seem ok and it's likely caused by the parskip/baselineskip adjusments). This remains an empirical WIP, though, I'll go on checking the changes and possibly backport them to my own environments to see how they behave here (the user guides for resilient.sile and markdown.sile have plenty of verbatim-like blocks too, so I'm eager to check how these changes would behave in that context...). But for now (3 AM lol), I need some sleep :p

@alerque
Copy link
Member Author

alerque commented Nov 2, 2024

Our son was born last week but had complications and is in the NICU for a while.

I'm sincerely sorry to hear about the complications. I can't imagine how hard this must be for you and your wife. I’m keeping you all, and your baby in my thoughts and hoping for a smooth recovery.

Thank you. We and our son have had a rough go of it. His heart stopped during birth and he ended up with stage 2 hypoxic-ischemic encephalopathy, spent 10 days in ICU, and is still under close neurological monitoring. Physically he's recovering fairly well although brain activity on an EEG is still abnormal. But we're glad he's home with us now and we're praying for his eventual full recovery.

@alerque alerque marked this pull request as ready for review November 2, 2024 22:39
alerque and others added 4 commits November 3, 2024 01:40
Honor the fixed part of left/right (margin) skips, so that verbatim
works in indented environments (e.g. a block quote)

Kill paragraph skips (very likely not expected in verbatim) and restore
proper baseline skips instead of ad-hoc spaces.

This also applies to autodoc's code blocks, simplified and aligned
on the same principles.
@alerque alerque merged commit a12be30 into master Nov 2, 2024
40 of 42 checks passed
@alerque alerque deleted the verbatim-lines branch November 2, 2024 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Software bug issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression in \verbatim & \autodoc:codeblock handling of blank lines
3 participants