match longer closing fences in fenced code blocks
This commit is contained in:
parent
f74cedacc3
commit
9d2fcf9ec0
|
@ -1,4 +1,4 @@
|
|||
;; Copyright (C) 2016 Erik Edrosa <erik.edrosa@gmail.com>
|
||||
;; Copyright (C) 2016, 2017 Erik Edrosa <erik.edrosa@gmail.com>
|
||||
;;
|
||||
;; This file is part of guile-commonmark
|
||||
;;
|
||||
|
@ -202,7 +202,7 @@
|
|||
(regexp-exec re-fenced-code (parser-str parser) (parser-pos parser)))
|
||||
|
||||
(define (fenced-code-end parser fence)
|
||||
(string-match (string-append "^" fence "$") (parser-str parser) (parser-pos parser)))
|
||||
(string-match (string-append "^" fence "+$") (parser-str parser) (parser-pos parser)))
|
||||
|
||||
(define (bullet-list-marker parser)
|
||||
(regexp-exec re-bullet-list-marker (parser-str parser) (parser-pos parser)))
|
||||
|
|
|
@ -57,7 +57,6 @@ aaa
|
|||
('document _
|
||||
('fenced-code _ "aaa\n```")))
|
||||
|
||||
(test-expect-fail 1) ;; TODO match longer closing fences
|
||||
(block-expect "parse-blocks, fenced code closing fence must be at least as long as
|
||||
the opening fence"
|
||||
"````
|
||||
|
@ -65,7 +64,7 @@ aaa
|
|||
```
|
||||
``````"
|
||||
('document _
|
||||
('frenced-code _ "aaa\n```")))
|
||||
('fenced-code _ "aaa\n```")))
|
||||
|
||||
(block-expect "parse-blocks, fenced code closing fence must be at least as long as
|
||||
the opening fence"
|
||||
|
|
Loading…
Reference in New Issue