Refactor parameter replacement logic

This commit is contained in:
ewin 2025-07-29 21:38:46 -04:00
parent 7fac86adbb
commit 0db95cad3d
Signed by: erin
SSH key fingerprint: SHA256:swjoHhREbZPbWe+gyJNi24d4NAxJSyUIm3fpZj4z3wc
3 changed files with 20 additions and 39 deletions

View file

@ -1,11 +1,6 @@
// Utilities for scraping data from the Lodestone
/**
* @see https://stackoverflow.com/a/6969486
* @param {string}
* @returns {string}
*/
const regExpEscape = str => str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
import {regExpEscape} from '../util/regexp.js';
/**
* Creates a regular expression that matches a link to the named item and