Skip to content

Commit

Permalink
Merge pull request #148 from astroDimitrios/feature/tab-admonition
Browse files Browse the repository at this point in the history
Add support for tabs / tabset panels
  • Loading branch information
froggleston authored Apr 5, 2024
2 parents e9ca729 + a3bc6c8 commit e75e0a4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
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

0 comments on commit e75e0a4

Please sign in to comment.