KevinBatdorf / obsidian-raycast

Raycast extension with commands for the note taking app Obsidian.
MIT License
108 stars 19 forks source link

Append to note formatting with {content} #49

Closed mikejongbloet closed 1 year ago

mikejongbloet commented 1 year ago

Hello!

Love this - thanks so much for creating and publishing your Raycast commands.

I saw in the tooltip the variable {content} which I've tried to use in my append template as I want the content to be wrapped by square brackets: * <small>**[{hour}:{minute}]**</small>[💭 Thought:: {content}]

When I capture a note it's capturing like this: image

Essentially the variable isn't being replaced and the contents are instead being appended to the end, rather than being wrapped in the square bracket.

Mike

marcjulianschwarz commented 1 year ago

Thank you for reporting this issue, I will have a look at this. What command were you using?

mikejongbloet commented 1 year ago

It was a while back but I'm fairly sure it was "Append to Daily Note".

Cheers.

jimmy-little commented 1 year ago

Adding to this - I'm experiencing the same problem.

I have the template for Append to Daily Note: | {hour}:{minute} | {content} | It is intended to add a row to my "log" table at the bottom of my daily note.

When I use the template this way, typing "this is a test" into Raycast- the output in Obsidian is: "| 09:35 | {content} |this is a test"

For a workaround, I just use | {hour}:{minute} | as the template and add the final "|" character manually.

KevinBatdorf commented 1 year ago

Have a PR to fix this. if {content} is found in the template it will replace it there rather than append it to the end.

https://github.com/KevinBatdorf/obsidian-raycast/pull/75

Will PR to the main Raycast repo in a bit and they usually merge these within a few days