mirror of
https://github.com/makew0rld/amfora.git
synced 2024-12-04 14:46:29 -05:00
parent
e5891a52e7
commit
cafbb5c4c1
@ -199,6 +199,7 @@ func Init() error {
|
||||
viper.SetDefault("a-general.color", true)
|
||||
viper.SetDefault("a-general.ansi", true)
|
||||
viper.SetDefault("a-general.bullets", true)
|
||||
viper.SetDefault("a-general.show_link", false)
|
||||
viper.SetDefault("a-general.left_margin", 0.15)
|
||||
viper.SetDefault("a-general.max_width", 100)
|
||||
viper.SetDefault("a-general.downloads", "")
|
||||
|
@ -50,6 +50,9 @@ ansi = true
|
||||
# Whether to replace list asterisks with unicode bullets
|
||||
bullets = true
|
||||
|
||||
# Whether to show link after link text
|
||||
show_link = false
|
||||
|
||||
# A number from 0 to 1, indicating what percentage of the terminal width the left margin should take up.
|
||||
left_margin = 0.15
|
||||
|
||||
|
@ -47,6 +47,9 @@ ansi = true
|
||||
# Whether to replace list asterisks with unicode bullets
|
||||
bullets = true
|
||||
|
||||
# Whether to show link after link text
|
||||
show_link = false
|
||||
|
||||
# A number from 0 to 1, indicating what percentage of the terminal width the left margin should take up.
|
||||
left_margin = 0.15
|
||||
|
||||
|
@ -134,6 +134,9 @@ func convertRegularGemini(s string, numLinks, width int, proxied bool) (string,
|
||||
// There is link text
|
||||
url = lines[i][:delim]
|
||||
linkText = strings.Trim(lines[i][delim:], " \t")
|
||||
if viper.GetBool("a-general.show_link") {
|
||||
linkText += " (" + url + ")"
|
||||
}
|
||||
}
|
||||
|
||||
if strings.TrimSpace(lines[i]) == "" || strings.TrimSpace(url) == "" {
|
||||
|
Loading…
Reference in New Issue
Block a user