mirror of
https://github.com/NixOS/nix-pills
synced 2024-09-18 03:50:12 -04:00
epub: Remove extra page breaks before headings
The sections are pretty short, leading to unnecessary pagination being required.
This commit is contained in:
parent
3dd9e04dd9
commit
05407a5a2f
|
@ -68,6 +68,8 @@
|
||||||
sed -Ei 's~(<h[1-6])(>.+) \{#([^\}]+)\}(</h[1-6]>)~\1 id="\3"\2\4~g' OEBPS/*.html
|
sed -Ei 's~(<h[1-6])(>.+) \{#([^\}]+)\}(</h[1-6]>)~\1 id="\3"\2\4~g' OEBPS/*.html
|
||||||
# Fix broken links in body.
|
# Fix broken links in body.
|
||||||
sed -Ei 's/("[0-9a-z-]+\.)md(["#])/\1html\2/g' OEBPS/*.html
|
sed -Ei 's/("[0-9a-z-]+\.)md(["#])/\1html\2/g' OEBPS/*.html
|
||||||
|
# Remove unnecessary page breaks, the sections are short.
|
||||||
|
substituteInPlace OEBPS/stylesheet.css --replace-fail "page-break-before: always;" ""
|
||||||
zip -q "../book/epub/Nix Pills.epub" **/*
|
zip -q "../book/epub/Nix Pills.epub" **/*
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue