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

Verbatim and friends do not honor blank lines #97

Open
Omikhleia opened this issue Oct 9, 2024 · 4 comments
Open

Verbatim and friends do not honor blank lines #97

Omikhleia opened this issue Oct 9, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@Omikhleia
Copy link
Owner

Omikhleia commented Oct 9, 2024

Same core issue as sile-typesetter/sile#2128 but in addition

  • (confirmed) We use silex.sile hacked typesetter, which is affected too = needing a a backport with a fix in silex and a dependency update
  • (confirmed but see below) We use our own resilient.verbatim (style enabled) which is affected too
  • (unconfirmed but likely) We have autodoc-resilient presumably affected too
  • (unconfirmed) There are various hacks in markdown.sile that were used as workaround for this old issue and may potentially break after a fix. Maybe it will just be ok, but a non-regression is needed anyway...
    • explicit spaces in the user guide's examples would have to be checked...
    • and also the "naive" Lua syntax hightligher, if I remember correctly what it does (adding some zerohbox too if my memory is right)
@Omikhleia Omikhleia added the bug Something isn't working label Oct 9, 2024
@Omikhleia
Copy link
Owner Author

Omikhleia commented Oct 9, 2024

Oh interesting... resilient.verbatim is less affected than I thought... and has even some good code (see its "IMPLEMENTATION NOTE" in-code comment) that should be up'ed to SILE's regular verbatim, IMHO:

  • honoring the fixed parts of the r/l skips... So code blocks in block quotes do what they should :)
  • using hfillglue instead of some dubious 10000pt :)
  • not cancelling baselineskip (which is a "small" part of the root issue...) :)
  • leaveHmode in the scope of the temporary settings (less critical for SILE which doesn't have our styling overhead, uses a hard-coded 6pt initial glue and no final glue. Yep. Oh well.)

Go re·sil·ient :)

@Omikhleia Omikhleia changed the title Verbatim and friends does not honor blank lines Verbatim and friends do not honor blank lines Oct 10, 2024
@Omikhleia
Copy link
Owner Author

(...) and also the "naive" Lua syntax hightligher, if I remember correctly what it does (adding some zerohbox too if my memory is right)

Indeed, this was always a bit dubious: https://github.com/Omikhleia/markdown.sile/blob/4c312906c400df54a32f85a520492fd8be063605/packages/markdown/commands.lua#L700

(Doh, using a ZWSP, not even a zerohbox, so my own memory of it was both right and wrong... 🤡 )

@Omikhleia Omikhleia added this to the 2.6.0 milestone Oct 13, 2024
@Omikhleia
Copy link
Owner Author

For silex.sile see Omikhleia/silex.sile#16 = fixed in 0.7.0

@Omikhleia Omikhleia removed this from the 2.6.0 milestone Dec 31, 2024
@Omikhleia
Copy link
Owner Author

As far as I tested, the above mentioned fix in silex seems sufficient. But as noted in the description, there were already a number of "hacks" in place, that are still here, and would need to be removed or refactored when dropping support for SILE 0.14... I don't have the mood yet, so keeping the issue until we address that big cleanup eventually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant