Refactor html_shell.rs to improve readability #109
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've added some tests to
html_shell.rs
. They don't really assert anything, but I used them to be able to quickly print out the output while refactoring to make sure that it looks right. I figured I'd leave them in for now in case you wanted to try running the code yourself while reviewing.window.__PERSEUS_RENDER_CFG
now gets defined at the top of<head>
instead of bottom, but I don't think that should change much. You know the code better than me though, so I figured I'd mention it just in case.I tried running the tests on my laptop, but they took a really long time since my specs aren't that great and I also ran into an issue with
geckodriver
. Maybe you could run the tests in CI?Let me know if you think there's more room for improvement or something should be changed!
Closes #108