Skip to content

Conversation

@cderv
Copy link
Collaborator

@cderv cderv commented Feb 9, 2021

This is required to have the correct identifier in the TOC corresponding to the link Github will create.

This will fix #2039

@cderv
Copy link
Collaborator Author

cderv commented Feb 9, 2021

@yihui is it ok for you to start using snapshot testing using testthat ?

Or do you prefer regex-testing like in

expect_match(res[grep("HEADER 1", res)+1], "<div style=\"page-break-after: always;\"></div>")
?

I wanted to try the former and found it was a good match for output that give us textual content to compare like markdown content.

Copy link
Contributor

@yihui yihui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks!

@cderv cderv merged commit a62cb20 into master Feb 9, 2021
@cderv cderv deleted the gfm-toc branch February 9, 2021 21:32
jonathan-g added a commit to jonathan-g/rmarkdown that referenced this pull request Mar 3, 2021
Merge remote-tracking branch 'rstudio_origin/master' into jg-devel

* rstudio_origin/master: (26 commits)
  Use data-external=1 to prevent encoding by Pandoc of img src
  add `subdirs` documentation for site generator (rstudio#2058)
  fix: corrected typo in `ghostscript` (rstudio#2059)
  Add CoC contact email
  quillt has moved to rstudio/quillt
  fix invalid HTML code in shiny_prerendered documents (rstudio#1942)
  Allow pkgdown PR preview (rstudio#2055)
  Adding pkgdown site built by GHA (rstudio#1955)
  Add shiny bslib dependency inside html_document_base pre-process (rstudio#2049)
  start the next version
  CRAN release v2.7
  place <div> in \code{}
  amend 62ae2ed and rstudio#1989: make sure output_format_filter is a function; testing NULL is not enough, e.g., the radix package still calls
  use CRAN releases of shiny and bslib
  tweak news
  Only keep the first url in citation  (rstudio#2041)
  Fix for knit_print.data.frame (rstudio#2050)
  set gfm_auto_identifiers to input format if toc is TRUE (rstudio#2040)
  Enable pkgdown/downlit cross-package links to rmarkdown (rstudio#1843)
  update CONTRIBUTING.md
  ...

# Conflicts:
#	DESCRIPTION
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

github_document() should set +gfm_auto_identifiers to the input for TOC to work correctly

4 participants