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 render.code() #997

Closed
wants to merge 4 commits into from
Closed

Add render.code() #997

wants to merge 4 commits into from

Conversation

wch
Copy link
Collaborator

@wch wch commented Jan 12, 2024

This PR adds a function render.code(), and, in Shiny Express, changes the output behavior for render.text().

In Shiny Express:

  • render.text() now uses output_text() as its output function, instead of output_text_verbatim().
  • The new render.code() uses output_text_verbatim() as its output function.

In Shiny Core:

  • render.text() and render.code() do the same thing, although the documentation now suggests pairing render.text with output_text(), and render.code() with output_text_verbatim().

In the future, when we add output_code() (perhaps with line numbers and syntax highlighting), we can change render.code() to use that output function instead of output_text_verbatim().

This is a screenshot of usage in a Shiny Express app:

image

@wch wch added this to the v0.7.0 milestone Jan 12, 2024
@wch wch mentioned this pull request Jan 12, 2024
55 tasks
@wch wch requested a review from schloerke January 12, 2024 22:06
@wch wch marked this pull request as ready for review January 12, 2024 22:06
@wch
Copy link
Collaborator Author

wch commented Jan 17, 2024

The changes here were incorporated in #1018.

@wch wch closed this Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant