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

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Test and fix verbatim line handling #2129

wants to merge 4 commits into from

Conversation

alerque
Copy link
Member

@alerque alerque commented Oct 8, 2024

Meant to address #2128, at the moment 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: 58.528% (-9.0%) from 67.573%
when pulling e9fd3b0 on verbatim-lines
into 3a0ef46 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.

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.
@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

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.

3 participants