Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date not rendered as link #1378

Closed
thomashirtz opened this issue May 19, 2024 · 1 comment
Closed

Date not rendered as link #1378

thomashirtz opened this issue May 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@thomashirtz
Copy link

thomashirtz commented May 19, 2024

Plugin information (please complete the following information):

  • OS: Windows 10
  • Templater version: 2.3.1
  • Obsidian version: 1.5.12

Describe the bug
When I try to create this template

---
date: [[<% tp.date.now("YYYY-MM-DD") %>]]
created: <% tp.file.creation_date("YYYY-MM-DD HH:mm:ss") %>
tags: 
---

The date is not viewed as a link and can't be clicked on it, it just appeared orange. It works if I put a link inside the properties or if I put the [[<% tp.date.now("YYYY-MM-DD") %>]] inside the page. The two at the same time doesn't work

Expected behavior
Page link in the property

---
project: 
date: [[<% tp.date.now("YYYY-MM-DD") %>]]
created: <% tp.file.creation_date("YYYY-MM-DD HH:mm:ss") %>
tags: 
related:
  - "[[blabla]]"
---
# [[<% tp.file.title %>]] 

[[<% tp.date.now("YYYY-MM-DD") %>]]

image

@thomashirtz thomashirtz added the bug Something isn't working label May 19, 2024
@Zachatoo
Copy link
Collaborator

Links in properties must be wrapped in double quotes, otherwise they will be parsed as a list, since [] denotes a list in YAML. This is a documented behavior here.

Closing since this is not a bug and not related to Templater. Any links in properties must be wrapped in double quotes, not just Templater links.

@Zachatoo Zachatoo closed this as not planned Won't fix, can't repro, duplicate, stale May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants