Skip to content

Commit 87d7fda

Browse files
committed
fix #4 the duplicate titles bug
1 parent 3066155 commit 87d7fda

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: copy-and-fix-book-html.py

+2
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ def fix_title(contents, chapter, chapter_info):
126126
title = titles[0]
127127
_strip_keeptogethers(title)
128128
title.text = chapter_info[chapter].chapter_title
129+
[anchor_link] = title.cssselect('a.anchor')
130+
anchor_link.tail = ''
129131
return html.tostring(parsed)
130132

131133
def _prep_prev_and_next_buttons(chapter, chapter_info, buttons_html):

0 commit comments

Comments
 (0)