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

Template is prepended inside the button's code #217

Open
GoOz opened this issue Mar 11, 2024 · 2 comments
Open

Template is prepended inside the button's code #217

GoOz opened this issue Mar 11, 2024 · 2 comments

Comments

@GoOz
Copy link

GoOz commented Mar 11, 2024

I'm using a button to add a pre-filled new row in a table. For that row I'm using templater because I need to run a script.
It used to work for months and now it just broke recently. I use it once a week so I'm not sure if it's from Obsidian's recent update or Buttons' recent update.

Here's the code I'm using for the button:

button
name Ajouter une nouvelle photo
type prepend template
action Shuffle - new row
color purple

^button-newRow

And my template is a simple:
| n | <% tp.user.shuffle_values() %> | |

Here's what I get

CleanShot.2024-03-11.at.09.17.10.mp4

Is that a regression or I'm just stupid?

Note that append works fine for some reason.

@shabegom
Copy link
Owner

Ah. Watched the video. Looks like the prepend offset is broken. Probably a regression.

@velvetwind
Copy link

This also happens when you use something like "type line(1) template" and "replace [1,100]" in view mode.
Broke after the last update :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants