Skip to content

Commit

Permalink
Fix regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
mournfulCoroner committed Dec 3, 2024
1 parent 27cb443 commit 1b07ccd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/shared/modules/markdown/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,11 @@ export function renderHTML(args: RenderHtmlArgs): RenderHtmlOutput {
plugins.push(...additionalPlugins);
}

// temp bug fix with terms until the editor supports transform plugin
const preparedText = text.replace(new RegExp(/\\\[\\\*(\S+)\\\]/), '[*$1]');
// temp terms bug fix until the editor supports transform plugin
const preparedText = text.replace(
new RegExp(/^\s*?\\\[\\\*(\w+)\\\]:(\s*?\w+?.*?)$/gm),
'[*$1]:$2',
);

const {
result: {html, meta},
Expand Down

0 comments on commit 1b07ccd

Please sign in to comment.