-
-
Notifications
You must be signed in to change notification settings - Fork 980
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
Issue with addition of automatic section-id for headers #1407
Comments
You mentioned it was hard to format R Markdown, and that is probably because you didn't fully read the issue guide when you create a new issue: https://github.com/rstudio/rmarkdown/issues/new (and more on the four-backtick rule). |
Okay thanks for that @yihui , I think I have now properly edited the issue post. |
This is a workaround and makes the document less readable but this is an alternative approach where you don't need to manually add an ID. I often use this approach to specify section headers dynamically inside for loops. It's a bit verbose but simple to write a function to pad with newlines, etc. if you don't want to write out full
|
Should be fixed now. Thanks for the report! |
…e attributes of section divs (otherwise they will be restored to HTML, so the <div> will be invalid HTML)
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary. |
Something that was discussed a few years back and closed a year ago in this thread #133 seems to be a problem for me again:
When including any r-shiny-code, RMarkdown wraps a span around it, e.g.:
<span id="outc6a1e60e89362530" class="shiny-text-output shiny-bound-output">Germany</span>
RMarkdown doesn't realise this however, and assigns the ID of the header wrong, resulting in the following:
The output can be seen here:
![output](https://user-images.githubusercontent.com/1690181/42896932-b571e20e-8abe-11e8-81b1-540e3ec04a6c.png)
Here is a reproducible code:
The exact same thing happens when I replace the region variable in the header with
renderText(input$region)
Has anyone figured out a solution to the problem yet?
The workaround also discussed in #133 with manually adding an ID works (i.e. adding
{#foo}
at the end of the header) though.The text was updated successfully, but these errors were encountered: