We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0828d83 commit 3fae579Copy full SHA for 3fae579
1 file changed
src/utils.js
@@ -35,11 +35,10 @@ export const convertHeadingToHTMLFragment = (inlineText) => {
35
* @returns {string} Text with all the keys replaced with their respective value.
36
**/
37
export const replaceMap = (text, replacementMap) =>{
38
- let og_text = text
39
for (const key of Object.keys(replacementMap)) {
40
let replacement = replacementMap[key]
41
if (!!replacement){
42
- text = text.replace(key,replacement)
+ text = text.replaceAll(key,replacement)
43
}
44
45
return text
0 commit comments