Skip to content
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

Add support for tabs / tabset panels #148

Merged
merged 2 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion R/validate_divs.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
#' - discussion
#' - checklist
#' - testimonial
#' - tab (can only contain text, images, and code blocks)
#' - group-tab (can only contain text, images, and code blocks)
#'
#' Any other div names will produce structure in the resulting DOM, but they
#' will not have any special visual styling.
Expand Down Expand Up @@ -75,7 +77,9 @@ KNOWN_DIVS <- c(
"testimonial",
"keypoints",
"instructor",
"spoiler"
"spoiler",
"tab",
"group-tab"
)

#' @rdname validate_divs
Expand Down
1 change: 1 addition & 0 deletions man/validate_divs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions tests/testthat/_snaps/validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
Message
! There were errors in 1/5 fenced divs

- The Carpentries Workbench knows the following div types callout, objectives, questions, challenge, prereq, checklist, solution, hint, discussion, testimonial, keypoints, instructor, spoiler
- The Carpentries Workbench knows the following div types callout, objectives, questions, challenge, prereq, checklist, solution, hint, discussion, testimonial, keypoints, instructor, spoiler, tab, group-tab

validation-divs.md:26 [unknown div] unknown

Expand Down Expand Up @@ -494,7 +494,7 @@
dv$validate_divs()
Message
! There were errors in 1/5 fenced divs
( ) The Carpentries Workbench knows the following div types callout, objectives, questions, challenge, prereq, checklist, solution, hint, discussion, testimonial, keypoints, instructor, spoiler
( ) The Carpentries Workbench knows the following div types callout, objectives, questions, challenge, prereq, checklist, solution, hint, discussion, testimonial, keypoints, instructor, spoiler, tab, group-tab

validation-divs.md:26 [unknown div] unknown

Expand All @@ -504,7 +504,7 @@
dv$validate_divs()
Message
! There were errors in 1/5 fenced divs
( ) The Carpentries Workbench knows the following div types callout, objectives, questions, challenge, prereq, checklist, solution, hint, discussion, testimonial, keypoints, instructor, spoiler
( ) The Carpentries Workbench knows the following div types callout, objectives, questions, challenge, prereq, checklist, solution, hint, discussion, testimonial, keypoints, instructor, spoiler, tab, group-tab

validation-divs.md:26 [unknown div] unknown

Expand All @@ -514,7 +514,7 @@
dv$validate_divs()
Message
! There were errors in 1/5 fenced divs
◌ The Carpentries Workbench knows the following div types callout, objectives, questions, challenge, prereq, checklist, solution, hint, discussion, testimonial, keypoints, instructor, spoiler
◌ The Carpentries Workbench knows the following div types callout, objectives, questions, challenge, prereq, checklist, solution, hint, discussion, testimonial, keypoints, instructor, spoiler, tab, group-tab

validation-divs.md:26 [unknown div] unknown

Expand All @@ -524,7 +524,7 @@
dv$validate_divs()
Message
! There were errors in 1/5 fenced divs
◌ The Carpentries Workbench knows the following div types callout, objectives, questions, challenge, prereq, checklist, solution, hint, discussion, testimonial, keypoints, instructor, spoiler
◌ The Carpentries Workbench knows the following div types callout, objectives, questions, challenge, prereq, checklist, solution, hint, discussion, testimonial, keypoints, instructor, spoiler, tab, group-tab

validation-divs.md:26 [unknown div] unknown

Expand Down Expand Up @@ -639,7 +639,7 @@
dv$validate_divs()
Message
! There were errors in 1/5 fenced divs
( ) The Carpentries Workbench knows the following div types callout, objectives, questions, challenge, prereq, checklist, solution, hint, discussion, testimonial, keypoints, instructor, spoiler
( ) The Carpentries Workbench knows the following div types callout, objectives, questions, challenge, prereq, checklist, solution, hint, discussion, testimonial, keypoints, instructor, spoiler, tab, group-tab

::warning file=validation-divs.md,line=26:: [unknown div] unknown

Loading