mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Add full stop to reserved character list
This commit is contained in:
@@ -17,7 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
- `MouseScrollUp` and `MouseScrollDown` now inherit from `MouseEvent` and have attached modifier keys. https://github.com/Textualize/textual/pull/1458
|
||||
- Fail-fast and print pretty tracebacks for Widget compose errors https://github.com/Textualize/textual/pull/1505
|
||||
- The default filename for screenshots uses ISO8601 datetime format, with colons and spaces replaced with underscores https://github.com/Textualize/textual/pull/1518
|
||||
- The default filename for screenshots uses a datetime format similar to ISO8601, but with reserved characters replaced by underscores https://github.com/Textualize/textual/pull/1518
|
||||
|
||||
### Fixed
|
||||
|
||||
|
||||
@@ -663,9 +663,10 @@ class App(Generic[ReturnType], DOMNode):
|
||||
dt = datetime.now().isoformat()
|
||||
else:
|
||||
dt = datetime.now().strftime(time_format)
|
||||
svg_filename = f"{self.title.lower()} {dt}.svg"
|
||||
for reserved in ' <>:"/\\|?*':
|
||||
svg_filename = svg_filename.replace(reserved, "_")
|
||||
svg_filename_stem = f"{self.title.lower()} {dt}"
|
||||
for reserved in ' <>:"/\\|?*.':
|
||||
svg_filename_stem = svg_filename_stem.replace(reserved, "_")
|
||||
svg_filename = svg_filename_stem + ".svg"
|
||||
else:
|
||||
svg_filename = filename
|
||||
svg_path = os.path.expanduser(os.path.join(path, svg_filename))
|
||||
|
||||
Reference in New Issue
Block a user