From 0a62a19c2f5b92af5c56c60c000557727959f09a Mon Sep 17 00:00:00 2001 From: carlospolop Date: Mon, 24 Nov 2025 23:42:29 +0100 Subject: [PATCH] Fix preprocessor for mdbook 0.5.x (sections -> items) --- hacktricks-preprocessor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hacktricks-preprocessor.py b/hacktricks-preprocessor.py index 25086220e..ee68ea548 100644 --- a/hacktricks-preprocessor.py +++ b/hacktricks-preprocessor.py @@ -165,6 +165,8 @@ if __name__ == '__main__': book_items = book.get('sections') or book.get('items', []) for chapter in iterate_chapters(book_items): + if chapter is None: + continue logger.debug(f"Chapter: {chapter['path']}") current_chapter = chapter # regex = r'{{[\s]*#ref[\s]*}}(?:\n)?([^\\\n]*)(?:\n)?{{[\s]*#endref[\s]*}}'