mirror of
https://github.com/Klipper3d/klipper.git
synced 2026-05-07 04:46:21 +02:00
docs: Fix warnings in re pattern and update py-gfm version
1. wipe out syntaxwarnings of "invalid escape sequence '\s'" 2. update py-gfm version to fit python3.8+ Signed-off-by: Ju Nan <junan76@163.com>
This commit is contained in:
@@ -6,5 +6,5 @@ mkdocs-simple-hooks==0.1.3
|
||||
mkdocs-exclude==1.0.2
|
||||
mdx-truly-sane-lists==1.2
|
||||
mdx-breakless-lists==1.0.1
|
||||
py-gfm==1.0.2
|
||||
py-gfm==2.0.0
|
||||
markdown==3.3.7
|
||||
|
||||
@@ -21,11 +21,11 @@ def transform(markdown: str, page, config, files):
|
||||
for i in range(len(lines)):
|
||||
line_out = lines[i]
|
||||
in_code_block = (in_code_block +
|
||||
len(re.findall("\s*[`]{3,}", line_out))) % 2
|
||||
len(re.findall(r"\s*[`]{3,}", line_out))) % 2
|
||||
if not in_code_block:
|
||||
line_out = line_out.replace('](../',
|
||||
f"]({config['repo_url']}blob/master/")
|
||||
line_out = re.sub("\\\s*$", "<br>", line_out)
|
||||
line_out = re.sub(r"\\\s*$", "<br>", line_out)
|
||||
# check that lists at level 0 are not indented
|
||||
# (no space before *|-|1.)
|
||||
if re.match(r"^[^-*0-9 ]", line_out):
|
||||
|
||||
Reference in New Issue
Block a user