Open mikepyne opened 4 years ago
After some more investigation, I found that the extra %
in my example messes up the replacement; if I edit my template so the link doesn't have %20
in it, the magic words are correctly replaced.
However, when editing an existing note, a magic word isn't replaced if it is in the middle of a line.
OS Version (操作系统): Windows 10 (1809, build 17763.973)
VNote Version (Help - About VNote - Version: )(VNote版本): 2.8.2
Symptoms (表现):
I have a template containing a number of magic words such as
%no%
,%date%
,%yyyy%
. When I open a note based on the template, the magic words aren't replaced and appear 'as is' (that is,%no%
is shown, instead of being replaced by the note title).A template that only uses
%no%
at the end of a line works as expected, as does a template that uses%dd%/%MM%/%yyyy%
in a table.This also happens in an existing note; if the magic word is on a line with text after it, the magic word isn't replaced when using the
CTRL+E,M
shortcut. A magic word is correctly replaced when it is at the end of a line.Other magic words that have similar behaviour, when in the middle of a line:
%MM%
%yyyy%
How to Repro (如何复现):
Template
(A) %date% Review [Lessons Learned](../../Wiki/Lessons%20Learned.md) due:%date%
%date%
.Existing Note
%date%
at the end of a line and useCTRL+E,M
to replace; the magic word is replaced correctly.%date%
, with some text after the magic word.%
of the magic word and useCTRL+E,M
; the magic word isn't replaced.