posit-dev / posit-dev/shinylive
Support `# |` for quarto metadata blocks
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 251
- Forks
- 25
- Avg merge
- 19m
- Merged PRs (30d)
- 2
Description
Originally reported by @mcanouil in https://github.com/quarto-ext/shinylive/issues/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)
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Shinylive extension's handling of Quarto metadata blocks and existing tests for #| parsing. Reproduce the example with # | standalone: true; done means the shinylive-python block accepts the spaced marker and preserves the expected standalone behavior. The issue names no file or test, so repository search is needed first.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100