Minor change to gophermap rendering to get rid of terminal period from server

This commit is contained in:
sloumdrone 2019-04-16 20:38:00 -07:00
parent 09dc779045
commit 3a173d89e0
1 changed files with 6 additions and 2 deletions

View File

@ -39,6 +39,11 @@ func (v *View) ParseMap() {
if v.Address.Gophertype == "1" || v.Address.Gophertype == "7" {
for i, e := range v.Content {
e = strings.Trim(e, "\r\n")
if e == "." {
v.Content[i] = " "
continue
}
line := strings.Split(e,"\t")
var title string
if len(line[0]) > 1 {
@ -56,7 +61,6 @@ func (v *View) ParseMap() {
v.Content[i] = linktext
}
}
v.Content = v.Content[: len(v.Content) - 1]
}
}