Skip to content

Support # | for quarto metadata blocks #196

@gadenbuie

Description

@gadenbuie

Originally reported by @mcanouil in quarto-ext/shinylive#67.

Python formatter do not like #| and will format to # |.
In regular Python code cells, Quarto supports this because of the above limitation.

The Shinylive extension on the other hand does not.

---
title: "Quarto Playground"
format: html
---

```{shinylive-python}
# | standalone: true

from shiny import *

app_ui = ui.page_fluid(
    ui.input_slider("n", "N", 0, 100, 40),
    ui.output_text_verbatim("txt"),
)


def server(input, output, session):
    @output
    @render.text
    def txt():
        return f"The value of n*2 is {input.n() * 2}"


app = App(app_ui, server)
```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions