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

Is there a way to have a javascript function for format in math blocks? #201

Open
hanoii opened this issue Feb 16, 2024 · 0 comments
Open

Comments

@hanoii
Copy link

hanoii commented Feb 16, 2024

I don't know or think this is possible, but thought of asking.

I wanted to format the numbers with some locale as they are currently currency and it's easier to follow.

I managed to do it with:

format(x) = x.toLocaleString('es-ar');

However, I am not super sure about to extent of javascript I could do with format. I tried complex functions, anonymous functions, arrows functions ,but none worked. It this this work only because it ends up being a valid math block function, but can I use a more complex format callback some how in the max block?

hanoii added a commit to hanoii/heynote that referenced this issue Feb 16, 2024
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

1 participant