1
0
mirror of https://github.com/makew0rld/amfora.git synced 2024-06-19 19:25:24 +00:00

🐛 Make .. command work like in v1.4.0

This commit is contained in:
makeworld 2020-11-04 20:41:09 -05:00
parent 819023daec
commit fb47eff23e
2 changed files with 8 additions and 0 deletions

View File

@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Clicking "Change" on an existing bookmark without changing the text no longer removes it (#91)
- Display HTTP Error if "Open In Portal" fails (#81)
- Support ANSI color codes again, but only in preformatted blocks (#59)
- Make the `..` command work lke it used to in v1.4.0
## [v1.5.0] - 2020-09-01

View File

@ -133,6 +133,13 @@ func Init() {
// This shouldn't occur
return
}
if query == ".." && tabs[tab].page.URL[len(tabs[tab].page.URL)-1] != '/' {
// Support what ".." used to work like
// If on /dir/doc.gmi, got to /dir/
query = "./"
}
target, err := current.Parse(query)
if err != nil {
// Invalid relative url