Add {{// (note)}} macro (#1265)

* add {{# (note)}} macro

* change from # to // for future updates

* fix docs
This commit is contained in:
IkariDevGIT
2023-10-21 13:28:02 +02:00
committed by GitHub
parent 51e0c9130a
commit 6fe4232f75
2 changed files with 4 additions and 0 deletions

View File

@ -1685,11 +1685,14 @@ function substituteParams(content, _name1, _name2, _original, _group) {
content = content.replace(/<CHARIFNOTGROUP>/gi, _group);
content = content.replace(/<GROUP>/gi, _group);
content = content.replace(/\{\{\/\/(.*?)\}\}/g, "");
content = content.replace(/{{time}}/gi, moment().format('LT'));
content = content.replace(/{{date}}/gi, moment().format('LL'));
content = content.replace(/{{weekday}}/gi, moment().format('dddd'));
content = content.replace(/{{isotime}}/gi, moment().format('HH:mm'));
content = content.replace(/{{isodate}}/gi, moment().format('YYYY-MM-DD'));
content = content.replace(/{{datetimeformat +([^}]*)}}/gi, (_, format) => {
const formattedTime = moment().format(format);
return formattedTime;