Open amy21206 opened 1 year ago
Yes, an author's source should specify "natural" language, or a computer language. (There might be a default for authors, perhaps for historical reasons.)
But in any event, the generated HTML for the problem should have an explicit attribute to that effect which the code here can react to unambiguously.
RunestoneInteractive/rs#20
Render blocks raw when micro Parsons find all blocks contain HTML, and when the language is not html.
Reason for asking all blocks to contain HTML: a complete HTML can be used as a string in other languages, e.g. in Python,
re.match('<b>', '<b>content</b>')
Two examples are shown below (included in test).
micro-Parsons dependency is updated in this PR, so
npm install
is needed.