Improves upon previoius fixes to gophermap parsing #130
No reviewers
Labels
No Label
blocked
bug
build
documentation
duplicate
enhancement
finger
gemini
gopher
help wanted
http
in progress
invalid
local
needs-info
non-code
non-functional
non-urgent
question
release
rendering
suggestion
telnet
terminal
urgent
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sloum/bombadillo#130
Loading…
Reference in New Issue
No description provided.
Delete Branch "gopher-parsing-improvement"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This should work better than the previous fix as it handles all cases. I believe what was breaking is that someone started a line with a tab and as a result
line[0][0]
was not possible. This update will make any line in whichlen(line[0]) < 1
makeline[0] = "i"
, resulting in the line being treated as a comment. Which I think is good behavior for such a malformed line.This looks good. I've run some tests on this and it works as expected without a panic.
You probably also first link is another weird line being rendered as a link of unknown type:
This is 5 spaces, two tabs, some more spaces and the ascii art, a tab, then the number 70. The "item type" is 5 spaces.
This seems like it could be an appropriate way to handle this line, as Lynx also does similar, but I don't think it allows you to try to browse that link. You probably have already thought this through so if it's ok then no worries.
I did check against what lynx was doing and also noticed that they still rendered it as a link. I think showing it as
???
should be sufficient. It isn't too doable to dig in and try to validate and verify every link. A user can always:check [link id]
to see where the link goes. At which point they will see that it is mangled. It may still appear at first glance to be a Bombadillo issue rather than an issue with the underlying map :-/ Not sure if there is anything to be done about it though.Sorry I just noticed I mistook how the item type is represented and interpreted. Yeah I think we are agreed.
Closing due to a shortcoming of tildegit: inability to switch the branch this is being merged into. A new PR will be opened referencing this one.
Pull request closed