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 allows for Ids for
<div class="figure"
, which solves half of the problem in rstudio/bookdown#766, which will allow for id references in bookdown for figures inepub
documents. An additional adaptation needs to be made in https://github.com/rstudio/bookdown/blob/master/R/html.R#L566, which I will make momentarily.Otherwise, this
reprex
should show that adding theid
causes fewerepub
errors:Clone the Repo
Test output
Simple epub checker function
The
epubcheck
R function will get the output fromepubcheck
.Then
num_errors
will count the number of errorsHere we see we get 4 errors from the result (seemingly no problems were
fixed).
The issue is that one of the lines has both a table reference (not fixed)
and a figure reference (fixed by this PR).
Created on 2019-08-28 by the reprex package (v0.3.0)
Session info
Another Example, but a little editing
Clone the Repo
This is required because this line technically has a table reference and a
figure reference - if we edit this, we show that the figure reference
is indeed fixed. The warning from counting figures will be
addressed in a PR to bookdown.
Test output
Simple epub checker function
The
epubcheck
R function will get the output fromepubcheck
.Then
num_errors
will count the number of errorsTest output
Here we see we get fewer errors from the result
Created on 2019-08-28 by the reprex package (v0.3.0)
Session info