Implemented proper conversion of links to local markdown files into html links
This commit is contained in:
parent
46e4f483f6
commit
7915a4bb09
7 changed files with 92 additions and 28 deletions
15
internal/util/util.go
Normal file
15
internal/util/util.go
Normal file
|
@ -0,0 +1,15 @@
|
|||
package util
|
||||
|
||||
import "strings"
|
||||
|
||||
func NormalizeContent(content string) string {
|
||||
var normalized []string
|
||||
lines := strings.Split(content, "\n")
|
||||
for _, line := range lines {
|
||||
line = strings.TrimSpace(line)
|
||||
if line != "" {
|
||||
normalized = append(normalized, line)
|
||||
}
|
||||
}
|
||||
return strings.Join(normalized, "\n")
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue