Skip to content

Commit

Permalink
chore: fix test and add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vedhav committed Dec 13, 2024
1 parent 1df1619 commit 94e355e
Show file tree
Hide file tree
Showing 3 changed files with 124 additions and 1 deletion.
8 changes: 8 additions & 0 deletions R/HTMLBlock.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#' @title `HTMLBlock`
#' @docType class
#' @description
#' Specialized `FileBlock` for managing HTML content in reports.
#' It's designed to handle various HTML content, and render the report as HTML,
#' however htmlwidget objects can also be rendered to static document-ready format.
#'
#' @keywords internal
HTMLBlock <- R6::R6Class( # nolint: object_name_linter.
classname = "HTMLBlock",
inherit = FileBlock,
Expand Down
115 changes: 115 additions & 0 deletions man/HTMLBlock.Rd

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

2 changes: 1 addition & 1 deletion tests/testthat/test-Renderer.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ testthat::test_that("renderRmd asserts the argument is a list of TextBlocks/Pict
renderer <- Renderer$new()
testthat::expect_error(
renderer$renderRmd(append(blocks, "STH")),
regexp = "May only contain the following types: \\{TextBlock,PictureBlock,NewpageBlock,TableBlock,RcodeBlock\\}"
regexp = "May only contain the following types: \\{TextBlock,PictureBlock,NewpageBlock,TableBlock,RcodeBlock,HTMLBlock\\}" # nolint line_length
)
})

Expand Down

0 comments on commit 94e355e

Please sign in to comment.