waldyrious / rst-playground

Browser-based reStructuredText playground, built on Pyodide and docutils.
https://waldyrious.github.io/rst-playground
ISC License
1 stars 4 forks source link

Look into cleaning up docutils' output #5

Open waldyrious opened 1 year ago

waldyrious commented 1 year ago

As mentioned here:

https://github.com/waldyrious/rst-playground/blob/f8698e0d0c33e1bfe324e1e126884e388bacf6d3/index.html#L73-L75

...we are currently using docutils's publish_string() to parse an rST string and produce an HTML string. The resulting HTML is a full page, complete with CSS. I would like to be able to have a cleaner output — just the rendered content, which could then be placed into the <output> element's innerHTML. Of course, this would make the app vulnerable to changes in docutils's output, but a pinned version (#2) or a test suite (#24) should be sufficient to avoid that.