fix: Handle extraction patterns that return None (#26)

Reviewed-on: #26
Co-authored-by: Glen Whitney <glen@studioinfinity.org>
Co-committed-by: Glen Whitney <glen@studioinfinity.org>
This commit is contained in:
Glen Whitney 2024-09-16 03:23:23 +00:00 committed by Glen Whitney
parent b6ab0fb7ee
commit c1d6d9e5a6
2 changed files with 3 additions and 1 deletions

View File

@ -156,6 +156,8 @@ is checked for `{! ... !}`.
and handling inclusion syntax.
"""
line = extraction_pattern.replace_line(line)
if line is None:
return
include_match = StreamInclusion.include_open.search(line)
if not include_match:
self.output_stream.write(line)

View File

@ -1,6 +1,6 @@
[metadata]
name = mkdocs-semiliterate
version = 0.8.0
version = 0.8.1
description = Extension of mkdocs-simple-plugin adding easy content inclusion
long_description = file: README.md
long_description_content_type = text/markdown