mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-13 01:47:51 +08:00
pkg/md: Accept at most 3 leading spaces in thematic break and ATX heading.
This commit is contained in:
parent
dee9199878
commit
ce87939ade
|
@ -69,10 +69,10 @@ type blockParser struct {
|
|||
|
||||
var (
|
||||
thematicBreakRegexp = regexp.MustCompile(
|
||||
`^[ \t]*((?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$`)
|
||||
`^ {0,3}((?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$`)
|
||||
|
||||
// Capture group 1: heading opener
|
||||
atxHeadingRegexp = regexp.MustCompile(`^ *(#{1,6})(?:[ \t]|$)`)
|
||||
atxHeadingRegexp = regexp.MustCompile(`^ {0,3}(#{1,6})(?:[ \t]|$)`)
|
||||
atxHeadingCloserRegexp = regexp.MustCompile(`[ \t]#+[ \t]*$`)
|
||||
|
||||
// Capture groups:
|
||||
|
|
Loading…
Reference in New Issue
Block a user