Skip to content

[BUG] jsontiddlers macro doesn't seem to have access to in-scope variables #9338

@hoelzro

Description

@hoelzro

Describe the bug

This expression doesn't output the current tiddler as serialized JSON:

<<jsontiddlers filter:"[is[current]]">>

Instead, you just get [], because that filter yields no titles - it seems that this is because the filter provided to jsontiddlers doesn't have access to the currentTiddler variable.

This isn't a huge bug, but it was definitely surprising behavior!

Expected behavior

I expect that jsontiddlers (and any macro that takes a filter expression, for that matter) has access to variables currently in scope.

To Reproduce

  1. Go to tiddlywiki.com
  2. Create a tiddler named "jsontiddlers target"
  3. Create another tiddler with the following content:
<<jsontiddlers filter:"[[jsontiddlers target]]">>

---

<$set name="target" value="jsontiddlers target">
<<jsontiddlers filter:"[<target>]">>
</$set>
  1. The output should be identical, but it's not

Screenshots

No response

TiddlyWiki Configuration

  • Version: 5.3.8
  • Saving mechanism: Manual
  • Plugins: whatever's installed on tiddlywiki.com
  • OS: Arch Linux
  • Browser: Firefox 143.0.4

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions