From 48433f350ce3b7bcae0835a0ff2bf610e495c0d0 Mon Sep 17 00:00:00 2001 From: NilsUeter Date: Sat, 28 Mar 2026 16:45:54 +0100 Subject: [PATCH] fix ** appearing in rules --- src/10th/Roster.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/10th/Roster.jsx b/src/10th/Roster.jsx index 0b16f2e..86033cb 100644 --- a/src/10th/Roster.jsx +++ b/src/10th/Roster.jsx @@ -1256,7 +1256,7 @@ const Abilities = ({ abilities }) => { filteredAbilities = new Map([...filteredAbilities, ...abilitiesForEnd]); const replacedAbilities = new Map(); - // in the value of the filtered abilites, make certain keywords bold + // in the value of the filtered abilites, make certain keywords bold and remove ** around keywords for (const [key, value] of filteredAbilities) { replacedAbilities.set(key, makeKeywordsBold(value)); } @@ -1321,6 +1321,9 @@ const makeKeywordsBold = (text) => { // replace words wrapped in ^^ ^^ with tags newValue = newValue.replace(/\^\^([^\^]+)\^\^/g, "$1"); + // replace words wrapped in ** ** with tags + newValue = newValue.replace(/\*\*([^\*]+)\*\*/g, "$1"); + // replace two newlines with one but only if there are two newlines in a row return newValue.replace(/\n\n+/g, "\n\n"); };