mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
improving replace url features
This commit is contained in:
@@ -90,14 +90,12 @@ export function markdownToHTMLSafe({
|
||||
replaceText?: { source: string; destination: string }[];
|
||||
}) {
|
||||
const html = markdownToHtmlNoImages(markdownString);
|
||||
if (convertImages) return convertImagesToCanvasImages(html, settings);
|
||||
|
||||
|
||||
const replacedHtml = replaceText.reduce(
|
||||
(acc, { source, destination }) => acc.replaceAll(source, destination),
|
||||
html
|
||||
);
|
||||
// return html;
|
||||
|
||||
if (convertImages) return convertImagesToCanvasImages(replacedHtml, settings);
|
||||
return replacedHtml;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user