Skip to content

Express string output are quoted and wrapped in a code block #872

@cpsievert

Description

@cpsievert

I find this behavior surprising (both the quoting and wrapping of strings into a code block):

import shiny.express

"Hello"
"express"
Screenshot 2023-12-07 at 1 22 24 PM

I would have expected a result closer to:

from shiny import ui
import shiny.express

ui.div("Hello")
ui.div("express")
Screenshot 2023-12-07 at 1 24 55 PM

Especially considering it's not terribly hard to opt-into code blocks (and I think we've been considering adding a more official one)?

from shiny import ui
import shiny.express

ui.markdown(
    """
```
Hello
```

```
express
```
"""
)

But maybe there's additional rationale for this as a default that I'm not aware of?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions