Skip to content

Merge from official - #4

Merged
dayeggpi merged 7 commits into
dayeggpi:masterfrom
sftwrdotdev:master
Jun 2, 2026
Merged

Merge from official#4
dayeggpi merged 7 commits into
dayeggpi:masterfrom
sftwrdotdev:master

Conversation

@dayeggpi

@dayeggpi dayeggpi commented Jun 2, 2026

Copy link
Copy Markdown
Owner

No description provided.

Roni Axelrad and others added 7 commits May 16, 2026 13:18
The find did not find text in those area editors before, with this fix, it does.
fix: make sure the find do not skip CODE and PRE areas.
The exported PDF previously had three issues:
- The first few characters of the first line were hidden behind the
  top-fade-mask gradient overlay.
- The TOC overlay, TOC toggle button, and find bar (if open) were
  visible in the exported PDF.
- Long lines inside code blocks were trimmed at the right edge because
  .viewer-content kept overflow: hidden during print, and the invalid
  `word-break: break-word` did not actually wrap long tokens.

Extend the @media print block in styles.css to hide the overlays,
release overflow on .viewer-content, and replace the bad word-break
rule with overflow-wrap: anywhere on pre / pre code.
Reduce content getting split unnaturally across pages in the exported
PDF:
- Headings get `break-after: avoid` so they no longer get stranded at
  the bottom of a page with their content on the next.
- Code blocks, blockquotes, tables, figures, images, mermaid diagrams,
  and KaTeX displays get `break-inside: avoid` so they stay on one
  page when they fit.
- Paragraphs and list items use `orphans: 3; widows: 3;` so prose can
  still split across pages but never with only one or two stranded
  lines at the top or bottom.

Note: blocks taller than a single page will still split (the browser
ignores break-inside in that case), but this fixes the common
"first line of a paragraph alone at the bottom" pattern.
@dayeggpi
dayeggpi merged commit cf492eb into dayeggpi:master Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants