again
This commit is contained in:
1 parent
84c8b8d40a
commit
ed1fda9db3
1 file changed
+1
-2
@@ -44,7 +44,6 @@ INSERT_BLOCK = (
|
|||||||
" if (last.includes(\".\")) return origin + pathname\n"
|
" if (last.includes(\".\")) return origin + pathname\n"
|
||||||
" return origin + pathname.replace(/[^/]*$/, \"\")\n"
|
" return origin + pathname.replace(/[^/]*$/, \"\")\n"
|
||||||
"})()\n\n"
|
"})()\n\n"
|
||||||
"const isElement"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
REPLACE_GETOPTS = (
|
REPLACE_GETOPTS = (
|
||||||
@@ -79,7 +78,7 @@ def patch(path: Path) -> bool:
|
|||||||
if REPLACE_GETOPTS not in text:
|
if REPLACE_GETOPTS not in text:
|
||||||
print(f"getOpts block missing in {path}")
|
print(f"getOpts block missing in {path}")
|
||||||
return False
|
return False
|
||||||
text = text.replace(INSERT_AFTER, INSERT_BLOCK, 1)
|
text = text.replace(INSERT_AFTER, INSERT_BLOCK + INSERT_AFTER, 1)
|
||||||
text = text.replace(REPLACE_GETOPTS, REPLACE_WITH, 1)
|
text = text.replace(REPLACE_GETOPTS, REPLACE_WITH, 1)
|
||||||
path.write_text(text, encoding="utf-8")
|
path.write_text(text, encoding="utf-8")
|
||||||
print(f"patched {path}")
|
print(f"patched {path}")
|
||||||
|
|||||||
Reference in new issue
Block a user