Skip to content

Commit c8bc5f3

Browse files
committed
refactor: remove redundant matchers during paragraph matching
1 parent adc08c7 commit c8bc5f3

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.changeset/grumpy-kids-attack.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'markdown-to-jsx': patch
3+
---
4+
5+
Remove redundant detectors when processing paragraphs.

index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -560,18 +560,16 @@ const NON_PARAGRAPH_BLOCK_SYNTAXES = [
560560
HEADING_R,
561561
HEADING_SETEXT_R,
562562
HEADING_ATX_COMPLIANT_R,
563-
HTML_COMMENT_R,
564563
NP_TABLE_R,
565-
ORDERED_LIST_ITEM_R,
566564
ORDERED_LIST_R,
567-
UNORDERED_LIST_ITEM_R,
568565
UNORDERED_LIST_R,
569566
]
570567

571568
const BLOCK_SYNTAXES = [
572569
...NON_PARAGRAPH_BLOCK_SYNTAXES,
573570
PARAGRAPH_R,
574571
HTML_BLOCK_ELEMENT_R,
572+
HTML_COMMENT_R,
575573
HTML_SELF_CLOSING_ELEMENT_R,
576574
]
577575

0 commit comments

Comments
 (0)