forked from sloum/bombadillo
First pass at indenting gemini content. I think it looks much nicer.
This commit is contained in:
parent
d17e530667
commit
e14518f3e9
|
@ -969,6 +969,7 @@ func (c *client) handleGemini(u Url) {
|
|||
c.search("", u.Full, capsule.Content)
|
||||
case 2:
|
||||
if capsule.MimeMaj == "text" {
|
||||
u.Mime = capsule.MimeMin
|
||||
pg := MakePage(u, capsule.Content, capsule.Links)
|
||||
pg.WrapContent(c.Width-1, (c.Options["theme"] == "color"))
|
||||
c.PageState.Add(pg)
|
||||
|
|
|
@ -361,6 +361,8 @@ func parseGemini(b, rootUrl, currentUrl string) (string, []string) {
|
|||
links = append(links, link)
|
||||
linknum := fmt.Sprintf("[%d]", len(links))
|
||||
splitContent[i] = fmt.Sprintf("%-5s %s", linknum, decorator)
|
||||
} else {
|
||||
splitContent[i] = fmt.Sprintf("%5s %s", " ", splitContent[i])
|
||||
}
|
||||
}
|
||||
return strings.Join(splitContent, "\n"), links
|
||||
|
|
Loading…
Reference in New Issue