Skip to content

Commit

Permalink
[FIX] Horizontal rule render for inline marked options #23380
Browse files Browse the repository at this point in the history
  • Loading branch information
dougfabris authored Nov 12, 2021
1 parent 96426cd commit 91c5ddc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client/components/MarkdownText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,21 @@ const listItemMarked = (text: string): string => {
const cleanText = text.replace(/<p.*?>|<\/p>/gi, '');
return `<li>${cleanText}</li>`;
};
const horizontalRuleMarked = (): string => '';

documentRenderer.link = linkMarked;
documentRenderer.listitem = listItemMarked;

inlineRenderer.link = linkMarked;
inlineRenderer.paragraph = paragraphMarked;
inlineRenderer.listitem = listItemMarked;
inlineRenderer.hr = horizontalRuleMarked;

inlineWithoutBreaks.link = linkMarked;
inlineWithoutBreaks.paragraph = paragraphMarked;
inlineWithoutBreaks.br = brMarked;
inlineWithoutBreaks.listitem = listItemMarked;
inlineWithoutBreaks.hr = horizontalRuleMarked;

const defaultOptions = {
gfm: true,
Expand Down

0 comments on commit 91c5ddc

Please sign in to comment.