mirror of
https://github.com/makew0rld/amfora.git
synced 2024-06-01 18:31:08 +00:00
Merge branch 'master' into commands
This commit is contained in:
commit
cf07d9ee2c
1
.github/workflows/homebrew.yml
vendored
1
.github/workflows/homebrew.yml
vendored
|
@ -12,5 +12,6 @@ jobs:
|
|||
with:
|
||||
# A PR will be sent to github.com/Homebrew/homebrew-core to update this formula:
|
||||
formula-name: amfora
|
||||
download-url: https://github.com/makeworld-the-better-one/amfora.git
|
||||
env:
|
||||
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_TOKEN }}
|
||||
|
|
|
@ -43,6 +43,8 @@ builds:
|
|||
goarch: arm
|
||||
- goos: openbsd
|
||||
goarch: arm64
|
||||
- goos: windows
|
||||
goarch: arm
|
||||
|
||||
archives:
|
||||
- format: binary
|
||||
|
|
12
CHANGELOG.md
12
CHANGELOG.md
|
@ -4,6 +4,18 @@ 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/),
|
||||
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
|
||||
### Fixed
|
||||
- Deadlock when loading an invalid `about:` URL (#277)
|
||||
- Crash when rendering text from stdin
|
||||
|
||||
|
||||
## [1.9.0] - 2021-12-07
|
||||
### Added
|
||||
- Support for version 1.1 JSON feeds
|
||||
|
|
12
Makefile
12
Makefile
|
@ -21,15 +21,15 @@ clean:
|
|||
|
||||
.PHONY: install
|
||||
install: amfora amfora.desktop
|
||||
$(INSTALL) -d $(PREFIX)/bin/
|
||||
$(INSTALL) -m 755 amfora $(PREFIX)/bin/amfora
|
||||
$(INSTALL) -d $(PREFIX)/share/applications/
|
||||
$(INSTALL) -m 644 amfora.desktop $(PREFIX)/share/applications/amfora.desktop
|
||||
$(INSTALL) -d $(DESTDIR)$(PREFIX)/bin/
|
||||
$(INSTALL) -m 755 amfora $(DESTDIR)$(PREFIX)/bin/amfora
|
||||
$(INSTALL) -d $(DESTDIR)$(PREFIX)/share/applications/
|
||||
$(INSTALL) -m 644 amfora.desktop $(DESTDIR)$(PREFIX)/share/applications/amfora.desktop
|
||||
|
||||
.PHONY: uninstall
|
||||
uninstall:
|
||||
$(RM) -f $(PREFIX)/bin/amfora
|
||||
$(RM) -f $(PREFIX)/share/applications/amfora.desktop
|
||||
$(RM) -f $(DESTDIR)$(PREFIX)/bin/amfora
|
||||
$(RM) -f $(DESTDIR)$(PREFIX)/share/applications/amfora.desktop
|
||||
|
||||
# Development helpers
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
version = "v1.9.0"
|
||||
version = "v1.9.2"
|
||||
commit = "unknown"
|
||||
builtBy = "unknown"
|
||||
)
|
||||
|
@ -94,6 +94,7 @@ func main() {
|
|||
}
|
||||
display.NewTabWithURL(url)
|
||||
} else if !isStdinEmpty() {
|
||||
display.NewTab()
|
||||
renderFromStdin()
|
||||
} else {
|
||||
display.NewTab()
|
||||
|
|
|
@ -540,13 +540,10 @@ func Reload() {
|
|||
func URL(u string) {
|
||||
t := tabs[curTab]
|
||||
if strings.HasPrefix(u, "about:") {
|
||||
if final, ok := handleAbout(t, u); ok {
|
||||
t.addToHistory(final)
|
||||
}
|
||||
return
|
||||
go goURL(t, u)
|
||||
} else {
|
||||
go goURL(t, fixUserURL(u))
|
||||
}
|
||||
|
||||
go goURL(t, fixUserURL(u))
|
||||
}
|
||||
|
||||
func RenderFromString(str string) {
|
||||
|
|
|
@ -231,13 +231,13 @@ func convertRegularGemini(s string, numLinks, width int, proxied bool) (string,
|
|||
|
||||
wrappedLink = wrapLine(linkText, width,
|
||||
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
|
||||
)
|
||||
|
||||
wrappedLink[0] = `[::b][` + strconv.Itoa(num) + "[][::-]" + spacing +
|
||||
`["` + strconv.Itoa(num-1) + `"]` + linkTag +
|
||||
`["` + strconv.Itoa(num-1) + `"]` +
|
||||
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
|
||||
buf = strings.TrimSuffix(buf, "\r\n")
|
||||
|
||||
rendered += fmt.Sprintf("[%s]", config.GetColorString("preformatted_text")) +
|
||||
buf + fmt.Sprintf("[%s:%s:-]\r\n", config.GetColorString("regular_text"), config.GetColorString("bg"))
|
||||
if viper.GetBool("a-general.color") {
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user