Skip to content

Commit

Permalink
Mark subprocess commands as raw strings
Browse files Browse the repository at this point in the history
  • Loading branch information
francesco-ballarin committed Jan 10, 2025
1 parent 0c582af commit 48ab87c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions _ext/ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,19 +113,19 @@ def on_build_finished(app, exc):
if exc is None and app.builder.format == "html":
# Unescape at symbol
subprocess.run(
"find " + str(app.outdir) + " -type f -not -path '*/\.git/*' -exec sed -i 's/%40/@/g' {} +",
"find " + str(app.outdir) + r" -type f -not -path '*/\.git/*' -exec sed -i 's/%40/@/g' {} +",
shell=True)
# Mark current page as active
subprocess.run(
"find " + str(app.outdir) + " -type f -not -path '*/\.git/*' -exec sed -i 's/"
"find " + str(app.outdir) + r" -type f -not -path '*/\.git/*' -exec sed -i 's/"
+ '<li class="md-tabs__item"><a href="#" class="md-tabs__link">'
+ "/"
+ '<li class="md-tabs__item md-tabs__item_current"><a href="#" class="md-tabs__link">'
+ "/g' {} +",
shell=True)
# Disable going to submenus on mobile
subprocess.run(
"find " + str(app.outdir) + " -type f -not -path '*/\.git/*' -exec sed -i 's/"
"find " + str(app.outdir) + r" -type f -not -path '*/\.git/*' -exec sed -i 's/"
+ 'id="__toc"'
+ "/"
+ 'id="__toc_disabled"'
Expand Down

0 comments on commit 48ab87c

Please sign in to comment.