dsebastien / obsidian-dataview-serializer

Obsidian plugin that gives you the power of Dataview, but generates Markdown, making it compatible with Obsidian Publish, and making the links appear on the Graph.
https://developassion.gitbook.io/obsidian-dataview-serializer
MIT License
57 stars 6 forks source link

Add support for multi-line queries #12

Open rodrigoportela opened 3 months ago

rodrigoportela commented 3 months ago

The plugin doesn't seem to work when the Dataview query is written in several lines. I thought the plugin wasn't working at all when doing some tests pasting multiline Dataview queries that were working in Dataview codeblocks without any problem, until editing the queries to be only one line together with the opening and closing parts of the HTML comment as well. Is this the intended behavior for some reason or a bug? Reporting here in case it's a bug. I also tried using soft line breaks (shift + enter).

Nothing essential, but it would be nice to be able to use the plugin without having long queries fit one line.

dsebastien commented 3 months ago

Hello,

Indeed, the code currently looks at lines one at a time. I could refactor it later to handle multi-line queries, but have little time available to focus on that now. Feel free to send a pull request if you're motivated! :)

For now, I'll mention this limitation in the documentation.

rodrigoportela commented 3 months ago

Hello,

Indeed, the code currently looks at lines one at a time. I could refactor it later to handle multi-line queries, but have little time available to focus on that now. Feel free to send a pull request if you're motivated! :)

For now, I'll mention this limitation in the documentation.

Thank you for confirming how it's supposed to work and that it may be changed.

Unfortunately, I'm more motivated than capable not being a developer and not having tried to understand how that code works. So let's better wait for another person to fix it. :)