mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Trim strings in objectives list
This commit is contained in:
@ -103,7 +103,7 @@ async function generateTasks() {
|
|||||||
const numberedListPattern = /^\d+\./
|
const numberedListPattern = /^\d+\./
|
||||||
|
|
||||||
// Add numbered tasks, store them without the numbers.
|
// Add numbered tasks, store them without the numbers.
|
||||||
for (const task of taskResponse.split('\n')) {
|
for (const task of taskResponse.split('\n').map(x => x.trim())) {
|
||||||
if (task.match(numberedListPattern) != null) {
|
if (task.match(numberedListPattern) != null) {
|
||||||
addTask(task.replace(numberedListPattern, '').trim())
|
addTask(task.replace(numberedListPattern, '').trim())
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user