RunestoneInteractive / RunestoneComponents

Packaging of the Runestone tools for publishing educational materials using github pages
http://runestoneinteractive.org
Other
101 stars 225 forks source link

Parsons problems List<String> being interpreted as html #1191

Closed bhoffman0 closed 3 years ago

bhoffman0 commented 3 years ago

In https://csawesome.runestone.academy/runestone/books/published/csawesome/MixedFreeResponse/RandomStringChooserParsonsA.html and probably elsewhere, List words in the parsons problems are being rendered as List words. I guess is being interpreted as html and not being printed.

Should I change these to <String> ? I will try that. Not sure if this was always a problem, or a new thing. -Beryl

bnmnetp commented 3 years ago

Hi Beryl,

We haven't changed anything about how we parse the blocks.

I looked at the source for that one and I notice that it does not have a :language: option given to the parsons problem which means that it defaults to trying to parse it as a Python language. I would try addling the language flag with the value of java to see if that fixes it. Parsons problems internally use a language aware parser for the blocks so my guess is that will fix it.

bnmnetp commented 3 years ago

The other thing you may have to resort to for this is to use the &lt; and &gt; in the parsons problems.

The library they used for parsons is called prettify.js but it has no information in it about where it came from and whether it is still maintained. I think it is a bug in that library which we have used forever....

bhoffman0 commented 3 years ago

Locally, :language: java didn't work but & lt worked. Thanks!