fix: remove trailing whitespace
This commit is contained in:
parent
9f99470557
commit
731ad4fd84
1 changed files with 5 additions and 5 deletions
10
.github/scripts/prepare_docs.py
vendored
10
.github/scripts/prepare_docs.py
vendored
|
|
@ -12,19 +12,19 @@ for filepath in glob.glob('docs/**/*.md', recursive=True):
|
||||||
with open(filepath, 'r', encoding='utf-8') as f:
|
with open(filepath, 'r', encoding='utf-8') as f:
|
||||||
content = f.read()
|
content = f.read()
|
||||||
|
|
||||||
# RULE A: Fix links pointing OUT to src/ or scripts/
|
# RULE A: Fix links pointing OUT to src/ or scripts/
|
||||||
# Logic: Because the folders were moved one level deeper, we remove exactly ONE '../'
|
# Logic: Because the folders were moved one level deeper, we remove exactly ONE '../'
|
||||||
content = re.sub(
|
content = re.sub(
|
||||||
r'\]\(\.\./((?:\.\./)*)(src|scripts)/([^)]*)\)',
|
r'\]\(\.\./((?:\.\./)*)(src|scripts)/([^)]*)\)',
|
||||||
r'](\1\2/\3)',
|
r'](\1\2/\3)',
|
||||||
content
|
content
|
||||||
)
|
)
|
||||||
|
|
||||||
# RULE B: Fix links pointing FROM the copied files back TO the original docs/ folder
|
# RULE B: Fix links pointing FROM the copied files back TO the original docs/ folder
|
||||||
# Logic: Since these files are now inside docs/, the 'docs/' segment in the path is redundant.
|
# Logic: Since these files are now inside docs/, the 'docs/' segment in the path is redundant.
|
||||||
content = re.sub(
|
content = re.sub(
|
||||||
r'\]\(((?:\.\./)+)docs/([^)]*)\)',
|
r'\]\(((?:\.\./)+)docs/([^)]*)\)',
|
||||||
r'](\1\2)',
|
r'](\1\2)',
|
||||||
content
|
content
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Reference in a new issue