forest's usability changes and fix html template encoding issue #1
Loading…
Reference in a new issue
No description provided.
Delete branch "forest/reticule:main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
https://stackoverflow.com/questions/17774958/go-after-parse-xml-file-with-template-parsefiles-the-first-became-lt
Go: After parse xml file with template.ParseFiles, the first "<" became "<"
This is how it looked before:
For some reason the
html/template
package is freakin out about<?xml ...
and converting it to<?xml
for "safety" reasons. So I just removed that part from the template and output it directly.@ -16,3 +16,3 @@
github.com/dgraph-io/ristretto v0.1.0 // indirect
github.com/dustin/go-humanize v1.0.0 // indirect
github.com/go-shiori/dom v0.0.0-20230515143342-73569d674e1c // indirect
github.com/go-shiori/dom v0.0.0-20210627111528-4e4722cd0d65 // indirect
I dont know why but I ran into module issues and the only way I was able to fix was by nuking my module cache, in the process I also tried deleting the transitive dependencies list and the
go.sum
file so thats why all these changes are here ☹️probably an issue unique to my environment but just thought I would explain what happened.
@ -31,1 +31,4 @@
Body string `clover:"body"`
Added time.Time `clover:"added"`
Id string `clover:"_id"`
}
auto formatter changes from vscodium
@ -53,3 +59,4 @@
conf.Init()
absPath, err := filepath.Abs(conf.DBPath)
the data directory not existing tripped me up when I first tried to run it.
@ -125,3 +144,3 @@
tplData.Articles = append(tplData.Articles, article)
}
tplData.Updated = tplData.Articles[0].Added
tplData.Updated = getFirstArticleAddedDate(tplData.Articles)
This threw an unhandled exception when i 1st tried to run it:
@ -166,0 +193,4 @@
return time.Unix(0, 0)
}
func getTemplate(filename string) (*template.Template, error) {
Honestly this function probably doesn't need to exist, I copy pasted it from greenhouse
in this case i think it might be better to just use
text/template
, no?ok i manually merged in some of your changes in
f2afa6f1f6
i'm gonna try my idea for the template escaping issue and then i'll close this PR.
...and here we go! this seems a bit cleaner to me
936023d710
Pull request closed