-
Notifications
You must be signed in to change notification settings - Fork 482
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
Implement size threshold for HTML pages #2205
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
2e68429
wip html size_threshold
mortenpi da7c53b
Merge branch 'master' into mp/html-size-limit
mortenpi c02aee8
updates
mortenpi 19bf85f
add tests for HTML arguments
mortenpi a6c00a7
add example builds too
mortenpi cd620b0
add new tests to the list
mortenpi 1cfd3a8
fix tests
mortenpi 97e0695
remove one line
mortenpi df031ed
fix threshold in tests
mortenpi 3065a9b
revertme: debug
mortenpi dfacd7a
Revert "revertme: debug"
mortenpi fbae77d
fix 1.6
mortenpi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Megabytepage | ||
|
||
This page has more than 1MB of HTML. | ||
|
||
```@example | ||
using Random | ||
for s in Base.Iterators.partition(randstring(2^20), 80) | ||
# Note: the join() is necessary to get strings (as opposed to Vector{Char} objects) | ||
# on older Julia versions, since there was a breaking-ish bugfix that changed how | ||
# Iterators.partition works with strings. join(::SubString) appears to basically be | ||
# a no-op, so it has no real effect on newer Julia versions. | ||
# | ||
# https://github.com/JuliaLang/julia/issues/45768 | ||
# https://github.com/JuliaLang/julia/pull/46234 | ||
# | ||
# Note: we _could_ also just print the vectors, but then the HTML files end up being | ||
# ~14 MiB. | ||
println(join(s)) | ||
end | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the alternative? Could documenter automatically save plots to file and load them from there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JuMP has quite a few pages which are large:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I should also check JuMP docs. But yes: #2143. It won't be in 1.0, but hopefully in 1.1 or so. In the meanwhile, the solution is just to set large enough
size_threshold
(or set it tonothing
).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if there was an
exclude::Vector{String}
argument where you could explicitly ignore some large pages?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That seems like a good idea. Forcing people to set a global size setting to ignore one page is not ideal. I'll merge this as is, but let's get that into 1.0 in a follow-up PR.