mirror of
https://github.com/kovetskiy/mark.git
synced 2026-05-03 22:12:35 +00:00
replace \r\n with \n, fix #42
This commit is contained in:
@@ -45,6 +45,12 @@ func LoadTemplate(
|
||||
return nil, err
|
||||
}
|
||||
|
||||
body = bytes.ReplaceAll(
|
||||
body,
|
||||
[]byte("\r\n"),
|
||||
[]byte("\n"),
|
||||
)
|
||||
|
||||
templates, err = templates.New(name).Parse(string(body))
|
||||
if err != nil {
|
||||
err = facts.Format(
|
||||
|
||||
@@ -85,6 +85,12 @@ func resolveLink(
|
||||
return "", karma.Format(err, "read file: %s", filepath)
|
||||
}
|
||||
|
||||
linkContents = bytes.ReplaceAll(
|
||||
linkContents,
|
||||
[]byte("\r\n"),
|
||||
[]byte("\n"),
|
||||
)
|
||||
|
||||
// This helps to determine if found link points to file that's
|
||||
// not markdown or have mark required metadata
|
||||
linkMeta, _, err := ExtractMeta(linkContents)
|
||||
|
||||
Reference in New Issue
Block a user