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

Doesn't support multiline strings #4

Closed waldyrious closed 1 year ago

waldyrious commented 1 year ago

Currently there's an ugly hack of using an <input> element (which only supports a single line) because I wasn't able to pass a multiline string from the <textarea> to docutils's publish_string():

https://github.com/waldyrious/rst-playground/blob/f8698e0d0c33e1bfe324e1e126884e388bacf6d3/index.html#L71-L72

This means the demo is only useful for single-line rST input, which is clearly inadequate. A proper fix should be implemented to allow using multiline strings and get rid of the <input> hack.