Skip to content

Commit 9f684d6

Browse files
committed
Support H6
1 parent 1c18b48 commit 9f684d6

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

app/epub2txt.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ document.addEventListener('DOMContentLoaded', () => {
4747
H5: 5,
4848
H6: 6
4949
};
50-
const MAX_HEADING_LEVEL = 5;
50+
const MAX_HEADING_LEVEL = 6;
5151

5252
// UI Elements
5353
const dropZone = document.getElementById('drop-zone');

epub2txt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
'h5': 5,
6363
'h6': 6
6464
}
65-
MAX_HEADING_LEVEL = 5
65+
MAX_HEADING_LEVEL = 6
6666
ANCHOR_MARKER_TAG = 'epub2txt-sep'
6767

6868
def resolve_zip_path(base_dir: str, href: str) -> str:

test-data/gen_test_epub.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ def foo():
134134
<h3>Subsection A.1</h3>
135135
<p>Multiple paragraphs should keep blank lines between them.</p>
136136
<p>Second paragraph in the same section.</p>
137+
<h6>Subsection A.1.a (H6)</h6>
138+
<p>H6 should render as six hashes in output.</p>
137139
<figure>
138140
<img src="../images/cover.svg" alt="Cover"/>
139141
<figcaption>Figure caption text.</figcaption>

0 commit comments

Comments
 (0)