fix(renderer): correct regexes for list extra tags

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
Erik Michelson
2025-11-25 01:31:02 +01:00
parent 801ef14b7e
commit 10ec965ed3
2 changed files with 4 additions and 3 deletions

View File

@@ -14,6 +14,7 @@
- Ignore the healthcheck endpoint in the "too busy" limiter
- Send the referrer origin for YouTube embeddings due to their requirement
- Force kill the server after a timeout when waiting for the realtime server to close connections on shutdown
- Fix regexes for `[time=...]`, `[name=...]` and `[color=...]` shortcodes in lists
## <i class="fa fa-tag"></i> 1.10.3 <i class="fa fa-calendar-o"></i> 2025-04-09

View File

@@ -233,10 +233,10 @@ window.viewAjaxCallback = null
// regex for extra tags
const spaceregex = /\s*/
const notinhtmltagregex = /(?![^<]*>|[^<>]*<\/)/
let coloregex = /\[color=([#|(|)|\s|,|\w]*?)\]/
let coloregex = /\[color=([#()\s,\w]*?)]/
coloregex = new RegExp(coloregex.source + notinhtmltagregex.source, 'g')
let nameregex = /\[name=(.*?)\]/
let timeregex = /\[time=([:|,|+|-|(|)|\s|\w]*?)\]/
let nameregex = /\[name=(.*?)]/
let timeregex = /\[time=([:,.+()\s\w-]*?)]/
const nameandtimeregex = new RegExp(nameregex.source + spaceregex.source + timeregex.source + notinhtmltagregex.source, 'g')
nameregex = new RegExp(nameregex.source + notinhtmltagregex.source, 'g')
timeregex = new RegExp(timeregex.source + notinhtmltagregex.source, 'g')