trilium icon indicating copy to clipboard operation
trilium copied to clipboard

(Bug report) Template collision for Code note

Open Nriver opened this issue 2 years ago • 1 comments

Trilium Version

0.53.2

What operating system are you using?

Other Linux

What is your setup?

Local + server sync

Operating System Version

Manjaro

Description

There is a note template for day note in the Journal. Then I try to create a code note, the new note seems to follow the template of the Journal instead of the button I clicked.

Peek 2022-07-27 11-30

Other types would go with the button. Peek 2022-07-27 11-31

Nriver avatar Jul 27 '22 03:07 Nriver

Hi, this is an unfortunate corner case which I don't know how to resolve.

On one hand you explicitly select a specific note type, but on the other hand the new note gets inherited template which can also define content/type - if we respected the explicit type override, we end up with note containing e.g. raw HTML coming from text template note in a code note. That's also not good.

zadam avatar Aug 03 '22 16:08 zadam