Skip to content

Commit

Permalink
fixes parser to be able to parse file names with and without ext
Browse files Browse the repository at this point in the history
  • Loading branch information
Kafkalasch committed Jul 1, 2024
1 parent 50f5d07 commit a87ade4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,10 @@ func getMarkdownForTag(tagName string, dirPath string) ([]byte, error) {

fileName := entry.Name()

expectedFileName := tagName + ".md"
expectedFileName := tagName
if !strings.HasSuffix(tagName, ".md") {
expectedFileName = tagName + ".md"
}

if fileName == expectedFileName {
fullPath := filepath.Join(dirPath, fileName)
Expand Down

0 comments on commit a87ade4

Please sign in to comment.