Revealjs - Cleaning how theme dependency is processed #10657
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.
This PR is a proposal to do several things, as part of refactoring.
sourceMappingUrl
cleaning we do for some themes with bootstrap is not done with revealjs. This refactor our code to do this. This will fix revealjsquarto.css
contains wrong sourceMappingUrl #10423With our current
quarto-html
dependency, used with revealjs, it leads to adding as dependency an empty file. Basically,quarto-html-<hash>.css
was only containingsourceMappingUrl
comment line, and now is empty. This PR now check for emptyness of the processed CSS file and if so, it does not add the CSS file as a HTML dependency. This save some typescript processing too.I did not add any test because not sure what should be tested in this case. I tried adding one to check that if a
quarto-html-<hash>.css
exists, it is not empty, but I think this was a bad test.Hopefully this change makes sense. Happy to discuss it.
Also, this PR uses now regex for the revealjs test that check a resource with hash, because it is at least the third time this week we would need to modify this test.