Skip to content

Commit 5832c42

Browse files
czipperzvspinu
authored andcommitted
Use markdown parsing for fenced code blocks
1 parent b2de636 commit 5832c42

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

poly-markdown.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@
6262
:tail-matcher (pm-make-text-property-matcher 'markdown-yaml-metadata-end))
6363

6464
(define-auto-innermode poly-markdown-fenced-code-innermode poly-markdown-root-innermode
65-
:head-matcher (cons "^[ \t]*\\(```{?[[:alpha:]].*\n\\)" 1)
66-
:tail-matcher (cons "^[ \t]*\\(```\\)[ \t]*$" 1)
65+
:head-matcher (pm-make-text-property-matcher 'markdown-gfm-block-begin :inc-end)
66+
:tail-matcher (pm-make-text-property-matcher 'markdown-gfm-block-end)
6767
:mode-matcher (cons "```[ \t]*{?\\(?:lang *= *\\)?\\([^ \t\n;=,}]+\\)" 1))
6868

6969
(define-auto-innermode poly-markdown-inline-code-innermode poly-markdown-root-innermode

0 commit comments

Comments
 (0)