Преглед на файлове

Merge pull request #423 from Tastalian/master

Remove undesired <html> and <body> tags in extract_toc
Justin Mayer преди 10 години
родител
ревизия
4caaf1ba46
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      extract_toc/extract_toc.py

+ 2 - 0
extract_toc/extract_toc.py

@@ -41,6 +41,8 @@ def extract_toc(content):
         toc.extract()
         content._content = soup.decode()
         content.toc = toc.decode()
+        if content.toc.startswith('<html>'):
+            content.toc = content.toc[12:-14]
 
 
 def register():