Add {{// (note)}} macro (#1265)
* add {{# (note)}} macro * change from # to // for future updates * fix docs
This commit is contained in:
parent
51e0c9130a
commit
6fe4232f75
|
@ -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;
|
||||
|
|
|
@ -3,6 +3,7 @@ System-wide Replacement Macros:
|
|||
<li><tt>{{user}}</tt> - your current Persona username</li>
|
||||
<li><tt>{{char}}</tt> - the Character's name</li>
|
||||
<li><tt>{{input}}</tt> - the user input</li>
|
||||
<li><tt>{{// (note)}}</tt> - you can leave a note here, and the macro will be replaced with blank content</li>
|
||||
<li><tt>{{time}}</tt> - the current time</li>
|
||||
<li><tt>{{date}}</tt> - the current date</li>
|
||||
<li><tt>{{weekday}}</tt> - the current weekday</li>
|
||||
|
|
Loading…
Reference in New Issue