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

Support # | for quarto metadata blocks #196

Open
gadenbuie opened this issue Jan 16, 2025 · 1 comment
Open

Support # | for quarto metadata blocks #196

gadenbuie opened this issue Jan 16, 2025 · 1 comment

Comments

@gadenbuie
Copy link
Contributor

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)
```
@gadenbuie
Copy link
Contributor Author

Problematic line:

if (!line.match(/^#\| /)) {

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

No branches or pull requests

1 participant