From 38318556aaf4e90cbf6deff05d472495ae3e5162 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Tue, 3 Oct 2023 16:22:58 +0200 Subject: [PATCH] Marking #eval as deprecated --- website/CHANGELOG.md | 1 + website/๐Ÿ”Œ Directive.md | 28 ---------------------------- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/website/CHANGELOG.md b/website/CHANGELOG.md index d1817b0a..708fe0c7 100644 --- a/website/CHANGELOG.md +++ b/website/CHANGELOG.md @@ -11,6 +11,7 @@ Oh boy, this is a big one. This release brings you the following: * The query syntax used in [[Live Queries]] (but also used in [[๐Ÿ”Œ Directive]]) has been significantly expanded, although there may still be bugs. Thereโ€™s still more value to be unlocked here in future releases. * The previous โ€œbacklinksโ€ plug is now built into SilverBullet as [[Linked Mentions]] and appears at the bottom of every page (if there are incoming links). You can toggle linked mentions via {[Mentions: Toggle]}. * A whole bunch of [[PlugOS]] syscalls have been updated, Iโ€™ll do my best update known existing plugs, but if you built existing ones some things may have broken. Please report anything broken in [Github issues](https://github.com/silverbulletmd/silverbullet/issues). +* This release effectively already removes the `#eval` [[๐Ÿ”Œ Directive]] (itโ€™s still there, but likely not working), this directive needs some rethinking. Join us on [Discord](https://discord.gg/EvXbFucTxn) if you have a use case for it and how you use/want to use it. Due to significant changes in how data is stored, likely your space will be resynced to all your clients once you upgrade. Just in case you may also want to {[Space: Reindex]} your space. If things are really broken, try the {[Debug: Reset Client]} command. diff --git a/website/๐Ÿ”Œ Directive.md b/website/๐Ÿ”Œ Directive.md index b2020430..56c3f2e6 100644 --- a/website/๐Ÿ”Œ Directive.md +++ b/website/๐Ÿ”Œ Directive.md @@ -45,31 +45,3 @@ So, for instance, a template can take a tag name as an argument: * [ ] [[๐Ÿ”Œ Directive@1537]] This is a test task #test - -## Eval -$eval -The `#eval` directive can be used to evaluate arbitrary JavaScript expressions. Itโ€™s also possible to invoke arbitrary plug functions this way. - -**Note:** ==This feature is experimental== and will likely evolve. - -A simple example is multiplying numbers: - - - 100 - - -However, you can also invoke arbitrary plug functions, e.g. the `titleUnfurlOptions` function in the `core` plug: - - - |id |name | - |------------|-------------| - |title-unfurl|Extract title| - - -Optionally, you can use a `render` clause to render the result as a template, similar to [[Live Queries]]: - - - id: title-unfurl - name: Extract title - --- - \ No newline at end of file