diff --git a/formatter.go b/formatter.go index dbb6676..1b6e5e2 100644 --- a/formatter.go +++ b/formatter.go @@ -26,7 +26,7 @@ func (fileContent *FileContent) FormatContent() string { var buffer []byte data := []byte(content) - re := regexp.MustCompile(`!?\[([^\]*]*)\]\(([^ ]*)\)`) + re := regexp.MustCompile(`!?\[([^\]*]*)\]\(([^ ]*?)\)`) for i, match := range re.FindAllSubmatch(data, -1) { if "!" == string(match[0][0:1]) {