Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update URL parsing #21

Merged
merged 6 commits into from
Jun 30, 2022
Merged

Update URL parsing #21

merged 6 commits into from
Jun 30, 2022

Conversation

blmayer
Copy link
Owner

@blmayer blmayer commented Jun 26, 2022

My shot at fixing the URL parsing, and relative URL handling.

@nicwaller
Copy link

8a3f9bc seems to be an improvement, but not yet perfect.

URL from command line

./astro derelict.garden
./astro gemini://derelict.garden
./astro derelict.garden/astro.gmi
./astro gemini://derelict.garden/astro.gmi

URL followed by navigation

./astro derelict.garden + g + 1
./astro gemini://derelict.garden + g + 1
./astro derelict.garden/astro.gmi + g + 2 (page does not render)
./astro gemini://derelict.garden/astro.gmi + g + 2 (page does not render)

URL + navigation + back button

./astro derelict.garden + g + 1 + b (blank page, q does not work)
./astro gemini://derelict.garden + g + 1 + b (blank page, q does not work)

In this case with the back button, it seems that path is getting populated incorrectly which leads to Page not found! and then astro tries to go back again which puts it in a very weird state.

image

@blmayer
Copy link
Owner Author

blmayer commented Jun 28, 2022

Nice tests, I'll use them to check my progress. I think, if I'm not mistaken, that this

./astro derelict.garden/astro.gmi + g + 2 (page does not render)

Selects a HTTP link, which is not supported by astro. I'll put a check for other protocols.

@blmayer blmayer merged commit 8d1ff8d into main Jun 30, 2022
@blmayer
Copy link
Owner Author

blmayer commented Jun 30, 2022

It passed your tests. Thanks!

@blmayer blmayer deleted the fix-url branch June 30, 2022 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants