Skip to content

Commit

Permalink
Merge pull request #683 from Akhilesh-max/user-guide
Browse files Browse the repository at this point in the history
Fixes #606 : This Pull Request resolves the bug that was preventing the ML kit help-guide from functioning properly.
  • Loading branch information
birm authored Mar 14, 2024
2 parents 8c168a5 + fcec7cc commit c7d8c84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions apps/dev-workbench/workbench.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
href="#"
data-toggle="modal"
data-target="#helpModal"
onClick="displayUserGuide()"
>
<i class="fas fa-question-circle"></i>
&nbsp;&nbsp;Help/User Guide</a
Expand Down
6 changes: 3 additions & 3 deletions apps/dev-workbench/workbench.js
Original file line number Diff line number Diff line change
Expand Up @@ -494,14 +494,14 @@ function importWork() {
}

// getting markdown from readme.md and parsing/displaying it as user-guide
$('.helpButton').click(function() {
function displayUserGuide() {
fetch('./readme.md').then((res) => res.blob()).then((blob) => {
let f = new FileReader();
f.onload = function(e) {
$('#helpModal .modal-body').html(marked(e.target.result));
$('#helpModal .modal-body').html(marked.marked(e.target.result));
$('#helpModal .modal-body td, #helpModal .modal-body th')
.css('border', '2px solid #dddddd').css('padding', '5px');
};
f.readAsText(blob);
});
});
}

0 comments on commit c7d8c84

Please sign in to comment.