Comments (4)
I have now disabled+enabled the extension, restarted obsidian, and re-installed the extension, and the issue persists in all cases.
(EDIT: I also have disabled all other plugins just in case there was some sort of conflict occurring)
After some more consideration problems only seem to arise when I have user-defined templates.
The {{ }} are only present when a template is applied when they contain a user-defined template, e.g. {{tp_yesterday}} renders properly as 2020-11-19, but if I define a user template "today" as "powershell (Get-Date -UFormat '%A, %d %B %Y')", applying the template with {{today}} gives {{Friday, 20 November 2020}}.
Also, while having the user-defined "today" template, if I try to use the internal template {{tp_today}}, applying the template to a document produces {{tp_Friday, 20 November 2020}}. It seems that wherever the text containing the name of a user-defined template is found, that template is inserted - If I define a template just called "a" with the same formula as the "today" template above, and apply it to a document containing just the string "the cat sat on the mat", the document produced is:
"The cFriday, 20 November 2020t sFriday, 20 November 2020t on the mFriday, 20 November 2020t"
I hope that this is useful info, if there are any more details about my environment that would be helpful let me know.
Thanks for this extension by the way, its much more useful than the core template functionality!
from templater.
Oh, okay ! Sorry, I misunderstood your initial question.
The curly braces are only necessary for internal templates, so stuff like {{tp_today}}
.
This is to recognize them and to avoid conflicts with user defined templates.
For user defined templates, you set whatever template keyword you want, like you experienced with the letter a
. You could also define a template like so: [[today]]
. This is up to you. Curly braces {{ }}
are not added nor imposed to user template keywords.
Maybe the README is a bit confusing about this ?
from templater.
Hello @Robert-Forrest, that issue seems weird, i'm not able to reproduce it.
I'm testing on a fresh new vault with version 0.4.2 and obsidian 0.9.15 as well.
I'm running Linux, but I tried on a Windows VM and couldn't reproduce this bug either.
You're the first one having this issue, and this seems like a problem with your machine, or your obsidian app.
Try restarting obsidian and try disabling / re-enabling Templater.
If this doesn't work, try uninstalling Templater and re-installing it.
Tell me how this goes.
from templater.
Ah! I see, I understand now - On reading the README again this has become clear, this was just down to me not grasping the way the template names worked properly.
Thanks for your help!
from templater.
Related Issues (20)
- "FileName.md has been modified externally" message after updating frontmatter via tp.hooks.on_all_templates_executed HOT 1
- Raw encoded file is causing lag with syntax highlighting enabled HOT 4
- Too small input area for folders path in New Folder template
- Incorrect Placement of Examples for tp.file.content in Documentation @ silentvoid13.github.io HOT 2
- tp.date.weekday offset by one day. Perhaps due to leap year? HOT 2
- Incorrect date calculation HOT 1
- Plugin fails to load on Android HOT 1
- Syntax Highlighting feature breaks the default Obsidian code embed, if the embedded code includes '<%' HOT 1
- Request for adding Chinese language support to Templater templates HOT 1
- [Feature request] Automatic templates ignore files setting
- Folder template (checkbox - include subfolders)
- Create new file from template HOT 2
- tp.date.now returns incorrect time. HOT 2
- Add native AI support HOT 1
- Add `<%*` tag to documentation HOT 1
- Templater script inserting newline before front matter HOT 3
- Don't Include Frontmatter in Output HOT 2
- Folder Notes take priority when creating file HOT 7
- Expand metadata in space - Geolocation coords support request
- Console error: app.js:1 No file creator assigned to create file with extension com. Falling back to markdown file creator. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from templater.