mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-06 20:58:04 +01:00
{{char_version_url_encoded}}
and macro replace in creator_notes_spoiler
This commit is contained in:
parent
f6343436b4
commit
7a2f6fb63f
@ -6684,7 +6684,7 @@ export function select_selected_character(chid) {
|
||||
$('#description_textarea').val(characters[chid].description);
|
||||
$('#character_world').val(characters[chid].data?.extensions?.world || '');
|
||||
$('#creator_notes_textarea').val(characters[chid].data?.creator_notes || characters[chid].creatorcomment);
|
||||
$('#creator_notes_spoiler').html(DOMPurify.sanitize(converter.makeHtml(characters[chid].data?.creator_notes || characters[chid].creatorcomment), { MESSAGE_SANITIZE: true }));
|
||||
$('#creator_notes_spoiler').html(DOMPurify.sanitize(converter.makeHtml(substituteParams(characters[chid].data?.creator_notes) || characters[chid].creatorcomment), { MESSAGE_SANITIZE: true }));
|
||||
$('#character_version_textarea').val(characters[chid].data?.character_version || '');
|
||||
$('#system_prompt_textarea').val(characters[chid].data?.system_prompt || '');
|
||||
$('#post_history_instructions_textarea').val(characters[chid].data?.post_history_instructions || '');
|
||||
|
@ -318,6 +318,7 @@ export function evaluateMacros(content, env) {
|
||||
content = content.replace(/{{isodate}}/gi, () => moment().format('YYYY-MM-DD'));
|
||||
|
||||
content = content.replace(/{{char_version}}/gi, characters[this_chid]?.data?.character_version);
|
||||
content = content.replace(/{{char_version_url_encoded}}/gi, encodeURIComponent(characters[this_chid]?.data?.character_version));
|
||||
|
||||
content = content.replace(/{{datetimeformat +([^}]*)}}/gi, (_, format) => {
|
||||
const formattedTime = moment().format(format);
|
||||
|
Loading…
x
Reference in New Issue
Block a user