Fix replacing text in itself

This commit is contained in:
askiiart 2023-08-27 18:22:56 -05:00
parent 50d4d073ba
commit 34d46d03b9
No known key found for this signature in database
GPG key ID: 85505F3A2264FA01

View file

@ -10,4 +10,4 @@ for item in files:
os.system(f'pandoc -f markdown-smart --data-dir . --template {dir}/template.html -t html -o {item}.html {item}.md --metadata title=\"$(grep -m 1 -oP \'(?<=^# ).*\' {item}.md | cat)\"') os.system(f'pandoc -f markdown-smart --data-dir . --template {dir}/template.html -t html -o {item}.html {item}.md --metadata title=\"$(grep -m 1 -oP \'(?<=^# ).*\' {item}.md | cat)\"')
# Replace 'language-' with 'language-' recursively # Replace 'language-' with 'language-' recursively
os.system("find . \( ! -regex '.*/\..*' \) -type f | xargs sed -i 's/language-/language-/g'") os.system("find . \( ! -regex './md2html.py' \) -type f | xargs sed -i 's/sourceCode /language-/g'")