We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 518cab8 commit 1dba422Copy full SHA for 1dba422
scripts/update_versions.py
@@ -1,13 +1,19 @@
1
import re
2
+
3
from playwright import sync_playwright
4
5
with sync_playwright() as p:
6
r = open("README.md", "r")
7
text = r.read()
8
for browser_type in [p.chromium, p.firefox, p.webkit]:
- rx = re.compile(r"<!-- GEN:" + browser_type.name + r"-version -->([^<]+)<!-- GEN:stop -->")
9
+ rx = re.compile(
10
+ r"<!-- GEN:" + browser_type.name + r"-version -->([^<]+)<!-- GEN:stop -->"
11
+ )
12
browser = browser_type.launch()
- text = rx.sub(f"<!-- GEN:{browser_type.name}-version -->{browser.version}<!-- GEN:stop -->", text)
13
+ text = rx.sub(
14
+ f"<!-- GEN:{browser_type.name}-version -->{browser.version}<!-- GEN:stop -->",
15
+ text,
16
17
browser.close()
18
19
w = open("README.md", "w")
0 commit comments