Update marker parsing regex

This commit is contained in:
Nicolò P 2025-10-30 09:36:53 +01:00
parent 0f16af95e7
commit 5cf42ff4be

View File

@ -151,7 +151,10 @@ Utils.buildBibliography = async function(recordUri, recordId) {
* to Stimulus links * to Stimulus links
*/ */
Utils.parseMarkers = function(text) { Utils.parseMarkers = function(text) {
const regex = /(?<marker>\[marker coords=\"(?<coords>[\d\s\.]+)\"\ ?(group=\"(?<group>\w+)\")?](?<content>[\w\s\.;:\-]+)\[\/marker\])/mig; const regex = /(?<marker>\[marker coords=\"(?<coords>[\d\s\.]+)\"\ ?(group=\"(?<group>\w+)\")?](?<content>[\w\s\.;:\-\"\']+)\[\/marker\])/mig;
if (!text) return text;
let matches = [...text.matchAll(regex)]; let matches = [...text.matchAll(regex)];
if (matches.length) { if (matches.length) {