Skip to content

Commit

Permalink
Fix progressive reveal and Topics with special characters not loading (
Browse files Browse the repository at this point in the history
…#330)

* Make sure to update the js model that the section was skipped

* allow for non ascii chars to be used in hash

* update news

* Use decodeURIComponent() over decodeURI() when working with just the hash
  • Loading branch information
schloerke authored Feb 12, 2020
1 parent bb36e1f commit 6620c67
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@ learnr 0.10.0.9000 (unreleased)

* Fixed a bug where broken exercise code created non-"length-one character vector". ([#311](https://github.com/rstudio/learnr/pull/311))

* Fixed extra parameter documentation bug. ([#323](https://github.com/rstudio/learnr/pull/323))
* Fixed extra parameter documentation bug for CRAN. ([#323](https://github.com/rstudio/learnr/pull/323))

* Fixed video initialization error caused by a jQuery version increase in Shiny. ([#326](https://github.com/rstudio/learnr/pull/#326))

* Fixed progressive reveal bug where the next section would not be displayed unless refreshed. ([#330](https://github.com/rstudio/learnr/pull/330))

* Fixed a bug where topics would not be loaded if they contained non-ascii characters. ([#330](https://github.com/rstudio/learnr/pull/330))


learnr 0.10.0
===========
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ $(document).ready(function() {
else {
scrollLastSectionToView = true;
}
// update UI
sectionSkipped([section.jqElement]);
// notify server
tutorial.skipSection(sectionId);
}
}
Expand Down Expand Up @@ -317,7 +320,7 @@ $(document).ready(function() {
function handleLocationHash() {

function findTopicIndexFromHash() {
var hash = window.location.hash;
var hash = window.decodeURIComponent(window.location.hash);
var topicIndex = 0;
if (hash.length > 0) {
$.each(topics, function( ti, t) {
Expand Down

0 comments on commit 6620c67

Please sign in to comment.