aboutsummaryrefslogtreecommitdiffstats
path: root/docs/_klipper3d/mkdocs_hooks.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2021-08-02 16:13:11 -0400
committerKevin O'Connor <kevin@koconnor.net>2021-08-02 16:14:54 -0400
commit3176150050b666a582ac0993dc14e6663133ecb9 (patch)
treee3374a0b79a2a9ffee8ebdb74223e41a67912227 /docs/_klipper3d/mkdocs_hooks.py
parent36e39692194a3f5a6a665592b4838451eb15ec56 (diff)
downloadkutter-3176150050b666a582ac0993dc14e6663133ecb9.tar.gz
kutter-3176150050b666a582ac0993dc14e6663133ecb9.tar.xz
kutter-3176150050b666a582ac0993dc14e6663133ecb9.zip
mkdocs_hooks: Improve check for not in a list
Look for lines that don't start with a list and don't start with a space to check for the end of a list. This fixes the rendering of the list in BLTouch.md . Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'docs/_klipper3d/mkdocs_hooks.py')
-rw-r--r--docs/_klipper3d/mkdocs_hooks.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/_klipper3d/mkdocs_hooks.py b/docs/_klipper3d/mkdocs_hooks.py
index b0e78f81..396832c4 100644
--- a/docs/_klipper3d/mkdocs_hooks.py
+++ b/docs/_klipper3d/mkdocs_hooks.py
@@ -28,7 +28,7 @@ def transform(markdown: str, page, config, files):
line_out = re.sub("\\\s*$", "<br>", line_out)
# check that lists at level 0 are not indented
# (no space before *|-|1.)
- if len(line_out) == 0:
+ if re.match(r"^[^-*0-9 ]", line_out):
in_list = False
elif re.match(r"^(\*|-|\d+\.) ", line_out):
in_list = True