Skip to content

Commit

Permalink
Update readme file for use example.
Browse files Browse the repository at this point in the history
  • Loading branch information
jhuix committed Jul 26, 2024
1 parent fadec65 commit 7c3ac49
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,15 +346,21 @@ Put the following line into your HTML page \<header> or \<body>:
})
.then(function(text) {
md = md + `\n\n## Showdown's Markdown syntax\n\n` + text;
showdowns.makeHtml(md).then(html => {
element.innerHTML = html;
showdowns.makeHtml(md).then(obj => {
element.innerHTML = obj.html;
showdowns.completedHtml(obj.scripts);
}).catch(err =>{
console.log(err);
});
})
.catch(function(error) {
console.log(error);
if (md) {
showdowns.makeHtml(md).then(html => {
element.innerHTML = html;
showdowns.makeHtml(md).then(obj => {
element.innerHTML = obj.html;
showdowns.completedHtml(obj.scripts);
}).catch(err =>{
console.log(err);
});
}
});
Expand Down

0 comments on commit 7c3ac49

Please sign in to comment.