quarto-ext / shinylive

Quarto extension to embed Shinylive for Python applications
https://quarto-ext.github.io/shinylive/
MIT License
141 stars 7 forks source link

Filter cli output and only parse first JSON line #23

Closed schloerke closed 9 months ago

schloerke commented 9 months ago

If my R profile prints something, I'd like for it to not be processed by shinylive extension.

cc @jcheng5

schloerke commented 9 months ago

Approaching this by removing any prefix string until the first { or [. Then the remaining text will be parsed.

This is not a perfect solution, but it works a lot better than a failed JSON parsing.