Closed theprateik closed 2 years ago
I believe I'm hitting the same bug
"journal.tpl-entry": "# ${d:dddd, MMMM DD YYYY}\n\n## Tasks\n\n## Notes\n\n"
# Thursday, 19 December 2019
## Tasks
## Notes
# ${d:dddd, MMMM DD YYYY}
## Tasks
## Notes
I am looking into it
I am looking into it
Any updates here? Same problem as above.
I'm hitting the same issue as scaba, every format seems to work except the custom one.
@pajoma, The fix is simple, just change the following lines in \out\src\ext\conf.js:
// around line 50
// this.regExpDateFormats = new RegExp(/\$\{(?:(year|month|day|localTime|localDate|weekday)|(d:\w+))\}/g);
this.regExpDateFormats = new RegExp(/\$\{(?:(year|month|day|localTime|localDate|weekday)|(d:[\s\S]+?))\}/g);
// in the switch case of replaceDateformats(st, date), around line 200
default:
// check if custom format
if (match.startsWith("${d:")) {
let modifier = match.substring(match.indexOf("d:") + 2, match.length - 1); // includes } at the end
// st.template = st.template.replace(match, mom.format(modifier));
st.value = st.value.replace(match, mom.format(modifier));
}
break;
I have added the current prerelease to this project, can you please download it from here and test it?
To test, use the option "Install from VSIX..." in the Extension View of Visual Studio Code.
This works like a charm for me with the following setting:
"journal.tpl-entry": "# W${d:WW dddd, YYYY-MM-DD}\n| In | Out |\n| --- | --- |\n| ${d:HH:mm} | HH:mm |\n\n## Tasks\n\n## Notes\n\n## Inline notes\n\n",
Thanks for the link and the install description and the quick response.
Has been fixed in previous release
I want to have the memo saved as following format, which is basically with the time the memo was created:
MEMO 2:55 PM : This is wonderful memo
So, as per my understanding this is where the
Templates
come into play. So, I followed following steps to setup my template for theMemo
. But, the result I received was not what I was expecting.Steps
Journal: Tpl-memo
setting value to- MEMO ${localTime}: ${input}
.Ctrl+Shit+J
command, enterThis is a wonderful memo
.md
file with the memo entered asMEMO ${localTime}: This is a wonderful memo
.Expectation (with the time when the memo was added)
MEMO 3:55 PM : This is wonderful memo
Result
MEMO ${localTime}: This is a wonderful memo
Am I missing any step here?