This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function updateBodyStorageLinks( | |
html: string, | |
dnsOld: string, | |
dnsNew: string, | |
idMapping: Record<string, string> | |
): { html: string; warnings: string[] } { | |
const escapedDnsOld = dnsOld.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); | |
let warnings: string[] = []; | |
// Match only <a href="..."> links that contain the old host |