mirror of
https://github.com/makew0rld/amfora.git
synced 2024-09-11 05:55:27 +03:00
parent
48d83d13d2
commit
61d8645401
@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [1.9.2] - 2021-12-10
|
||||||
|
### Fixed
|
||||||
|
- Preformatted text color showing even when `color = false` (bug since v1.8.0 at least) (#278)
|
||||||
|
- Link numbers and link text in color even when `color = false` (regression in v1.9.0) (#278)
|
||||||
|
|
||||||
|
|
||||||
## [1.9.1] - 2021-12-08
|
## [1.9.1] - 2021-12-08
|
||||||
### Fixed
|
### Fixed
|
||||||
- Deadlock when loading an invalid `about:` URL (#277)
|
- Deadlock when loading an invalid `about:` URL (#277)
|
||||||
|
@ -16,7 +16,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
version = "v1.9.1"
|
version = "v1.9.2"
|
||||||
commit = "unknown"
|
commit = "unknown"
|
||||||
builtBy = "unknown"
|
builtBy = "unknown"
|
||||||
)
|
)
|
||||||
|
@ -231,13 +231,13 @@ func convertRegularGemini(s string, numLinks, width int, proxied bool) (string,
|
|||||||
|
|
||||||
wrappedLink = wrapLine(linkText, width,
|
wrappedLink = wrapLine(linkText, width,
|
||||||
strings.Repeat(" ", indent)+
|
strings.Repeat(" ", indent)+
|
||||||
`["`+strconv.Itoa(num-1)+`"]`+linkTag,
|
`["`+strconv.Itoa(num-1)+`"]`,
|
||||||
`[::-][""]`,
|
`[::-][""]`,
|
||||||
false, // Don't indent the first line, it's the one with link number
|
false, // Don't indent the first line, it's the one with link number
|
||||||
)
|
)
|
||||||
|
|
||||||
wrappedLink[0] = `[::b][` + strconv.Itoa(num) + "[][::-]" + spacing +
|
wrappedLink[0] = `[::b][` + strconv.Itoa(num) + "[][::-]" + spacing +
|
||||||
`["` + strconv.Itoa(num-1) + `"]` + linkTag +
|
`["` + strconv.Itoa(num-1) + `"]` +
|
||||||
wrappedLink[0] + `[::-][""]`
|
wrappedLink[0] + `[::-][""]`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -341,8 +341,12 @@ func RenderGemini(s string, width int, proxied bool) (string, []string) {
|
|||||||
// Lines are modified below to always end with \r\n
|
// Lines are modified below to always end with \r\n
|
||||||
buf = strings.TrimSuffix(buf, "\r\n")
|
buf = strings.TrimSuffix(buf, "\r\n")
|
||||||
|
|
||||||
rendered += fmt.Sprintf("[%s]", config.GetColorString("preformatted_text")) +
|
if viper.GetBool("a-general.color") {
|
||||||
buf + fmt.Sprintf("[%s:%s:-]\r\n", config.GetColorString("regular_text"), config.GetColorString("bg"))
|
rendered += fmt.Sprintf("[%s]", config.GetColorString("preformatted_text")) +
|
||||||
|
buf + fmt.Sprintf("[%s:%s:-]\r\n", config.GetColorString("regular_text"), config.GetColorString("bg"))
|
||||||
|
} else {
|
||||||
|
rendered += buf + "\r\n"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// processRegular processes non-preformatted sections
|
// processRegular processes non-preformatted sections
|
||||||
|
Loading…
Reference in New Issue
Block a user