mrjackphil / obsidian-text-expand

A simple text expand plugin for Obsidian.md
186 stars 12 forks source link

Bug: frontmatter sequence doesnt handle nested items (v0.10.8) #67

Open QuaCKeReD opened 2 years ago

QuaCKeReD commented 2 years ago
(path:"02 Diary")
^# Test
$frontmatter:frontmatter1
$frontmatter:nested.frontmatter2
$header:#

Should return

# Test
frontmatter1
nested.frontmatter2
[[filename#header]]

Where 'nested.frontmatter2' should either be the value of both the levels, or just the nested level value

Instead, it returns

# Test
frontmatter1
[object Object].frontmatter2
[[filename#header]]

The '[object Object].frontmatter2' is literal string returned (no front matter value returned); CleanShot 20220510 111129 ONK1Oj2b

mrjackphil commented 2 years ago

While it didn't fixed you can try use eta for those purposes:

<% it.files.forEach(file => ({ %>
<%= file.frontmatter.nested.frontmatter2 %>
<% }) %>
QuaCKeReD commented 2 years ago

is that templater code?

How do I 'use' that?

mrjackphil commented 2 years ago

@QuaCKeReD That's from 0.11.2

    ```expander
    SEARCH_QUERY
    <% it.files.forEach(file => ({ %>
    <%= file.frontmatter.nested.frontmatter2 %>
    <% }) %>