mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Collapse newlines in prompt
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
export {
|
||||
collapseNewlines,
|
||||
collapse_newlines,
|
||||
force_pygmalion_formatting,
|
||||
};
|
||||
@ -11,6 +12,10 @@ const storage_keys = {
|
||||
force_pygmalion_formatting: "TavernAI_force_pygmalion_formatting",
|
||||
};
|
||||
|
||||
function collapseNewlines(x) {
|
||||
return x.replaceAll(/\n+/g, "\n");
|
||||
}
|
||||
|
||||
function loadPowerUserSettings() {
|
||||
collapse_newlines = localStorage.getItem(storage_keys.collapse_newlines) == "true";
|
||||
force_pygmalion_formatting = localStorage.getItem(storage_keys.force_pygmalion_formatting) == "true";
|
||||
|
Reference in New Issue
Block a user