shabegom / buttons

Buttons in Obsidian
The Unlicense
455 stars 47 forks source link

Calculation not working #71

Closed mrpurplecloud closed 5 months ago

mrpurplecloud commented 2 years ago

Wanted a counter button so started testing with the example code:

```button
name Add Em Up
type calculate
action 2+2 ``` But nothing happened when clicking, nowhere to find the output

Win10, plugin version 0.4.15, Obsidian version 0.12.12

shabegom commented 2 years ago

Weird! Does anything show up in the dev console?

to open the dev console I believe it is Ctrl+Shift+I on Windows or it should be under the View menu.

Let me know if anything shows up and I'll try to recreate the problem.

calpa commented 2 years ago

@shabegom nothing show in the console, no errors, no warnings

Expected result: write a 4 at the bottom of the note

shabegom commented 2 years ago

I wonder if it is a platform specific issue. I don't have a Windows computer to test with.

MSzturc commented 2 years ago

Got the same bug on my MacOS too. No logs, no warnings.

shabegom commented 2 years ago

I believe this is an issue with whitespace not being trimmed. Will push 0.2.16 and check if it is fixed.