fix ** appearing in rules
This commit is contained in:
+4
-1
@@ -1256,7 +1256,7 @@ const Abilities = ({ abilities }) => {
|
|||||||
filteredAbilities = new Map([...filteredAbilities, ...abilitiesForEnd]);
|
filteredAbilities = new Map([...filteredAbilities, ...abilitiesForEnd]);
|
||||||
|
|
||||||
const replacedAbilities = new Map();
|
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) {
|
for (const [key, value] of filteredAbilities) {
|
||||||
replacedAbilities.set(key, makeKeywordsBold(value));
|
replacedAbilities.set(key, makeKeywordsBold(value));
|
||||||
}
|
}
|
||||||
@@ -1321,6 +1321,9 @@ const makeKeywordsBold = (text) => {
|
|||||||
// replace words wrapped in ^^ ^^ with <strong> tags
|
// replace words wrapped in ^^ ^^ with <strong> tags
|
||||||
newValue = newValue.replace(/\^\^([^\^]+)\^\^/g, "<strong>$1</strong>");
|
newValue = newValue.replace(/\^\^([^\^]+)\^\^/g, "<strong>$1</strong>");
|
||||||
|
|
||||||
|
// replace words wrapped in ** ** with <strong> tags
|
||||||
|
newValue = newValue.replace(/\*\*([^\*]+)\*\*/g, "<strong>$1</strong>");
|
||||||
|
|
||||||
// replace two newlines with one but only if there are two newlines in a row
|
// replace two newlines with one but only if there are two newlines in a row
|
||||||
return newValue.replace(/\n\n+/g, "\n\n");
|
return newValue.replace(/\n\n+/g, "\n\n");
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user