Clean up regexps

This commit is contained in:
Niklas Fasching 2018-12-20 15:21:33 +01:00
parent 36436a4c59
commit ab9d87fbc8
4 changed files with 5 additions and 5 deletions

View file

@ -16,7 +16,7 @@ type FootnoteDefinition struct {
Inline bool
}
var footnoteDefinitionRegexp = regexp.MustCompile(`^\[fn:([\w-]+)\](\s+(.+)|$)`)
var footnoteDefinitionRegexp = regexp.MustCompile(`^\[fn:([\w-]+)\](\s+(.+)|\s*$)`)
func lexFootnoteDefinition(line string) (token, bool) {
if m := footnoteDefinitionRegexp.FindStringSubmatch(line); m != nil {