Skip to content

Commit 838cd71

Browse files
author
Barbara Borges Ribeiro
authored
Merge pull request #146 from rstudio/fix136
Display full HTML messages if provided by the `incorrect` or the `correct` args to `question() `
2 parents 346a5ee + 68fe595 commit 838cd71

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

NEWS.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
learnr 0.9.2
22
===========
33

4-
* Improved documentation for deploying `learnr` tutorials in Shiny Server. ([142](https://github.com/rstudio/learnr/issues/142))
4+
* Fixed [#136](https://github.com/rstudio/learnr/issues/136) by displaying full HTML messages (rather than just the text) if provided by the `incorrect` or the `correct` args to `question()`. ([#146](https://github.com/rstudio/learnr/pull/146))
5+
6+
* Improved documentation for deploying `learnr` tutorials in Shiny Server. ([#142](https://github.com/rstudio/learnr/issues/142))
57

68
* Fixed a highlight.js issue from rmarkdown 1.8. ([#133](https://github.com/rstudio/learnr/issues/133))
79

inst/htmlwidgets/quiz.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ HTMLWidgets.widget({
5757

5858
// look for custom messages
5959
var msg_class = correct ? '.correct' : '.incorrect';
60-
var message = $(el).find('.responses').children(msg_class).children('div').text();
60+
var message = $(el).find('.responses').children(msg_class).children('div').html();
6161
var messages = $(el).find('.answers').children(msg_class + '[data-message]');
6262
messages.each(function() {
6363
if ($(this).children('input').is(':checked')) {

0 commit comments

Comments
 (0)