HananoshikaYomaru / obsidian-run

Generate markdown from dataview query and javascript.
https://yomaru.dev
MIT License
34 stars 2 forks source link

inline run block #11

Closed HananoshikaYomaru closed 11 months ago

HananoshikaYomaru commented 1 year ago

Is your feature request related to a problem? Please describe.

this is my %%= 3%% note

Describe the solution you'd like

  1. inline expression only work on simple javascript expression but not multiple statements
  2. if user really multiple lines statement, they can use the user defined script with templater
HananoshikaYomaru commented 1 year ago

I don't want the syntax to be clumsy so using ending tag might not be a good idea. But need to think about this first.

StefanoRausch commented 1 year ago

Why not stay traditional and, e.g., use the inline code block with an additional identifier, like Dataview does?

What about r= 3 -- r for Run. 😉

HananoshikaYomaru commented 1 year ago

it is difficult because dataview doesn't generate markdown at all, all it does it just render the result in the viewing mode. For run to know the previous content so that it can replace it, it must have an ending tag or some other way to keep track of the previous result.

StefanoRausch commented 1 year ago

Okay... what about p= <expression> =q? If the user needs to use backticks in the expression, they can be escaped.

I think it would be a visual enhancement to see the inline run block rendered as an inline code block.

HananoshikaYomaru commented 1 year ago

Then the p= =q will be visible as markdown.

HananoshikaYomaru commented 11 months ago

I rarely encounter use cases that I need to use inline run block.