mdscrub: residual html, control characters, headings, page markers

This commit is contained in:
funkpower
2026-09-19 11:30:05 -04:00
parent e0473fb8ae
commit 1b3c002b3d
34 changed files with 975 additions and 18 deletions
+11
View File
@@ -0,0 +1,11 @@
# <span id="page12"></span>The Quarrel
The mill stood at the northern end of the valley.
<span id="page13"></span>
Two miles downstream the abbey had built its own.
## <a id="page-14"></a>
Text under a heading that was nothing but an anchor.
+10
View File
@@ -0,0 +1,10 @@
First paragraph.
Second paragraph after four blank lines.
<span class="only-a-tag"></span>
Third paragraph after a line that was nothing but a tag.
+5
View File
@@ -0,0 +1,5 @@
The address was set with explicit line breaks:<br>Twelve Mill Lane<br/>The
Valley<br />and the county beyond.
A second paragraph, where the break sits mid sentence — the mill stood at
the<br>northern end of the valley, where the fall was steepest.
Binary file not shown.
+14
View File
@@ -0,0 +1,14 @@
Ordinary <em>prose</em> before the fence.
```html
<span class="kept">This is an example and must survive.</span>
<a href="#x">So must this.</a>
```
Ordinary <b>prose</b> after the fence.
~~~xml
<note epub:type="footnote">Also kept.</note>
~~~
The end <i>of it</i>.
+11
View File
@@ -0,0 +1,11 @@
# [I. The Setting](#ch1) {.unnumbered}
## [The Quarrel]{.chapter-title}
### **THE SETTLEMENT**
#### <span class="head">A Spaced Heading</span>
#not a heading
Body text follows, and is left alone apart from its tags.
+12
View File
@@ -0,0 +1,12 @@
# [<span id="page3"></span>III. The Second Estate](#ch3)
The obligation ran <em>both ways</em>, and contemporaries said so plainly
whenever they were asked.<a href="#n4"><sup>4</sup></a>
<span id="page4"></span>
What the rolls do not say is how often the obligation was tested.
## [Notes]{.section-title}
4. Bloch, *Feudal Society*, vol. 2, p. 17.
+11
View File
@@ -0,0 +1,11 @@
<span class="class_s28E">The</span> second <em>estate</em> held its land in
exchange for <strong>service</strong>, and the service was
<a href="#n1"><sup>1</sup></a> military.
<div class="section">
A paragraph inside a div that means nothing once the styling is gone.
</div>
Text with an angle bracket in it: a < b and c > d, which is not a tag.