diff --git a/_test/extra.txt b/_test/extra.txt index f194d69..41b1d7d 100644 --- a/_test/extra.txt +++ b/_test/extra.txt @@ -374,3 +374,9 @@ a* b c d *e*

a* b c d e

//= = = = = = = = = = = = = = = = = = = = = = = =// +24: HTML block tags can contain trailing spaces +//- - - - - - - - -// + +//- - - - - - - - -// + +//= = = = = = = = = = = = = = = = = = = = = = = =// diff --git a/parser/html_block.go b/parser/html_block.go index 45c0fa2..db2cf11 100644 --- a/parser/html_block.go +++ b/parser/html_block.go @@ -93,7 +93,7 @@ var htmlBlockType5Close = []byte{']', ']', '>'} var htmlBlockType6Regexp = regexp.MustCompile(`^[ ]{0,3}.*|/>.*|)\n?$`) -var htmlBlockType7Regexp = regexp.MustCompile(`^[ ]{0,3}<(/)?([a-zA-Z0-9\-]+)(` + attributePattern + `*)(:?>|/>)\s*\n?$`) +var htmlBlockType7Regexp = regexp.MustCompile(`^[ ]{0,3}<(/)?\s*([a-zA-Z0-9\-]+)(` + attributePattern + `*)\s*(:?>|/>)\s*\n?$`) type htmlBlockParser struct { }