try to ignore images for now
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Arnas Udovic 2023-02-14 17:43:37 +02:00
parent 7fbd1ce6f8
commit 8a261a6ca1

View file

@ -26,7 +26,8 @@ func (fileContent *FileContent) FormatContent() string {
var buffer []byte var buffer []byte
data := []byte(content) data := []byte(content)
re := regexp.MustCompile(`!?\[([^\]*]*)\]\(([^ ]*)\)`) re := regexp.MustCompile(`(?<!!)\[([^\]*]*)\]\(([^ ]*)\)`)
//re := regexp.MustCompile(`!\[([^\]*]*)\]\(([^ ]*)\)`) -- image
for i, match := range re.FindAllSubmatch(data, -1) { for i, match := range re.FindAllSubmatch(data, -1) {
replaceWithIndex := append(match[1], fmt.Sprintf("[%d]", i+1)...) replaceWithIndex := append(match[1], fmt.Sprintf("[%d]", i+1)...)