-
-
Notifications
You must be signed in to change notification settings - Fork 176
[BUG] Leading zeros are stripped from template filename when starting with tt0xxxx #1139
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When creating a file from a template and the filename is an imdbId like tt0780504 the leading zero is deleted and the filename is tt780504.
This happens when the file name format is off and the input is manual or the file name format is on and the input is from a variable.
If the variable is prefixed with "" it does not work as obviously this is not allowed in a filename.
To Reproduce
Steps to reproduce the behavior in Obsidian:
- Open Obsidian and create a macro and then add a template
- Run the macro and it will ask for a filenname
- Input tt0780504 and filename is tt780504
Expected behavior
It should not strip the leading zero.
Obsidian Debug Info (required for bug reports)
Obsidian version: 1.12.5
Installer version: 1.12.4
Operating system: Windows 11 Enterprise
Login status: logged in
Language: en
Live preview: on
Base theme: dark
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 11
Plugins enabled: 11
1: Auto Link Title v1.5.5
2: Dataview v0.5.68
3: Linter v1.31.2
4: List Callouts v1.2.9
5: Meta Bind v1.4.6
6: Metadata Menu v0.8.12
7: Plugin Update Tracker v1.7.0
8: QuickAdd v2.12.0
9: Recent Files v1.7.6
10: Tasks v7.23.1
11: Templater v2.18.1
Environment (please complete the following information):
- Obsidian version: see above
- QuickAdd version: latest
- Operating system: Windows 11
- Debug info: QuickAdd: (LOG) TemplateEngine.createFileWithTemplate: Collected 0 template property variables for Movies/tt780505.md
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
