Rooyca / obsidian-api-request

Obsidian plugin that allows you to make HTTP requests and display responses directly in the document, in codeblocks, or store them in localStorage.
https://rooyca.github.io/obsidian-api-request/
MIT License
100 stars 5 forks source link

Failure to Parse Multiple {} Variables in HTML Parameters #11

Closed tlwt closed 5 months ago

tlwt commented 5 months ago

Description: The issue arises when attempting to parse multiple {} variables within HTML parameters. While the plugin successfully handles single {} variables, it encounters errors when multiple variables are present.

Examples:

  1. Working Example 1:

    show: data -> 0 -> hash_id
    format: <a href="https://monica/people/{}">link</a>

    this outputs a working link to the contact.

  2. Working Example 2:

    show: data -> 0 -> first_name
    format: <a href="https://monica/people/someHashLink">{}</a>

    this output the correct link name.

  3. Issue Example:

    show: data -> 0 -> hash_id, data -> 0 -> first_name
    format: <a href="https://monica/people/{}">{}</a>

    this outputs just ">Kay

In the provided examples, the plugin fails to correctly parse multiple {} variables within HTML parameters. While single variables function properly, attempting to incorporate more than one results in parsing errors.

Rooyca commented 5 months ago

Thanks for letting me know about this. I think it's fix now.

tlwt commented 5 months ago

Awesome again - it is working correctly now.