From 500b959ed1cf1d0be955173f1a9c4d29ef1d898e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 3 May 2024 14:12:56 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- taxonium_component/src/utils/processNextstrain.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/taxonium_component/src/utils/processNextstrain.js b/taxonium_component/src/utils/processNextstrain.js index b3de6664..a26ba900 100644 --- a/taxonium_component/src/utils/processNextstrain.js +++ b/taxonium_component/src/utils/processNextstrain.js @@ -431,16 +431,20 @@ async function json_to_tree(json) { function markdownToHTML(md) { // Regular expression to match Markdown links var markdownLinkRegex = /\[([^\]]+)\]\(([^)]+)\)/g; - + // Replace Markdown links with HTML tags - var html = md.replace(markdownLinkRegex, '$1'); - + var html = md.replace( + markdownLinkRegex, + '$1' + ); + return html; -} + } config.overlay = `
This is a tree extracted from a Nextstrain JSON file, being visualised in Taxonium.
.`; if (json.meta.description) { - config.overlay = config.overlay + "" + markdownToHTML(json.meta.description) + "
"; + config.overlay = + config.overlay + "" + markdownToHTML(json.meta.description) + "
"; } if (json.meta && json.meta.updated) {