Gophermap RFC improvement

This commit is contained in:
Luxferre
2023-03-31 08:22:32 +03:00
parent 713a34e1aa
commit 429a9ab40c
2 changed files with 7 additions and 0 deletions
+2
View File
@@ -7,6 +7,7 @@
# - mouse support
# - smoother rendering and scrolling
# - better edge-case stability
# - better Gophermap processing according to the RFC
# - multi-level navigation history (although you can only go back)
# - status bar with currently opened resource name
# - ability to accept gopher:// URLs from the command line
@@ -152,6 +153,7 @@ amclick() { # args: AM line[, forcedl], output: AM line(s)
for line in "${lines[@]}"; do # iterate over every fetched line
line="${line##$'\n'}" # remove a starting LF if it's there
line="${line%%$'\r'}" # remove a trailing CR if it's there
[[ "$line" == '.' ]] && break # stop processing Gophermaps on .
gmparse "$line" "$rhost" "$rport"
done
elif [[ 'P' == "$action" ]]; then # plain text content (can be delimited with both CRLF or LF)