I often find myself wanting syntax highlighting when writing code blocks for other plugins in code blocks.
However, the plugins usually need their own key after the backticks to recognize the query.
For example in the Obsidian-tasks plugin, I have queries like this:
```tasks title="Not highlighted code"
not done
filter by function !task.file.folder.includes("Templates/")
filter by function task.file.tags.find((tag) => tag.includes("project")) && true || false
group by function task.filename
```
I would like to specify that this should be considered as Javascript, or any other language the same way we can specify a title and such instead of only using the first word after the backticks.
```tasks language=js title="Highlighted tasks js code"
To get something like this while editing, and still having the plugin working:
not done
filter by function !task.file.folder.includes("Templates/")
filter by function task.file.tags.find((tag) => tag.includes("project")) && true || false
group by function task.filename
I'm not sure how big of an ask that is, but I'm up to try implementing it, if you are interested.
I often find myself wanting syntax highlighting when writing code blocks for other plugins in code blocks.
However, the plugins usually need their own key after the backticks to recognize the query.
For example in the Obsidian-tasks plugin, I have queries like this:
I would like to specify that this should be considered as Javascript, or any other language the same way we can specify a title and such instead of only using the first word after the backticks.
To get something like this while editing, and still having the plugin working:
I'm not sure how big of an ask that is, but I'm up to try implementing it, if you are interested.