PsyTeachR / webex

RMarkdown tools for creating self-guided web exercises
https://psyteachr.github.io/webex/
Other
55 stars 3 forks source link

quotes not matched in `fitb()` or `mcq()` #2

Closed dalejbarr closed 5 years ago

dalejbarr commented 6 years ago

This code fails:

mcq(c(answer = "rep(c('A', 'B'), c(1, 2))", "alt2", "alt3"))

The resulting HTML looks like this:

<select class="solveme" data-answer="[&quot;rep(c(" A', 'B'), c(1, 2))"]'>
<option></option>
<option>rep(c(‘A’, ‘B’), c(1, 2))</option>
<option>alt2</option>
<option>alt3</option>
</select>

might be a problem when answer is converted to JSONlite?

dalejbarr commented 5 years ago

This is resolved in release 0.9.0.