Skip to content

Commit 0a62a19

Browse files
committed
Fix preprocessor for mdbook 0.5.x (sections -> items)
1 parent 9dbbab5 commit 0a62a19

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

hacktricks-preprocessor.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ def iterate_chapters(sections):
165165
book_items = book.get('sections') or book.get('items', [])
166166

167167
for chapter in iterate_chapters(book_items):
168+
if chapter is None:
169+
continue
168170
logger.debug(f"Chapter: {chapter['path']}")
169171
current_chapter = chapter
170172
# regex = r'{{[\s]*#ref[\s]*}}(?:\n)?([^\\\n]*)(?:\n)?{{[\s]*#endref[\s]*}}'

0 commit comments

Comments
 (0)