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

ft: improve handling of shiny and htmltools tags #78

Conversation

kennedymwavu
Copy link
Contributor

@kennedymwavu kennedymwavu commented Nov 13, 2024

closes #76 & #77

  • remove redundant calls to convert_body() in the Response methods: send(), sendf() and text()
  • refactor convert_body() by removing unnecessary checks
  • improve handling of shiny & htmltools tags

with this PR, this reprex now works as expected:

# app.R
library(ambiorix)
library(htmltools)

app <- Ambiorix$new()

app$get("/", \(req, res){
  x <- tagList(
    tags$h1("hello"),
    tags$h2("there")
  )
  res$send(x)
})

app$start()

@JohnCoene
Copy link
Collaborator

Looks good, thanks!

@JohnCoene JohnCoene merged commit 459a5b5 into master Nov 13, 2024
5 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants