code cleaning

This commit is contained in:
Kutaz 2023-01-10 11:20:03 -05:00
parent 51b6f915ff
commit 4c37c57ed5
2 changed files with 11 additions and 11 deletions

View file

@ -52,7 +52,7 @@ class RenderMarkdown extends Operation {
highlight: function(str, lang) {
if (lang && hljs.getLanguage(lang) && enableHighlighting) {
try {
return hljs.highlight(lang, str).value;
return hljs.highlight(lang, str).value;
} catch (__) {}
}

View file

@ -535,8 +535,8 @@ class OutputWaiter {
file = new File([data], fileName);
FileSaver.saveAs(file, fileName, false);
}
/**
/**
* Handler for file download as pdf events.
*/
async downloadPdf() {
@ -553,15 +553,15 @@ class OutputWaiter {
const data = await dish.get(Dish.HTML);
// console.log(data, "this is our html")
const doc = new jsPDF("p", "px", "a4");
const width = doc.internal.pageSize.getWidth();
const width = doc.internal.pageSize.getWidth();
doc.html(data, {
autoPaging: "text",
width: width,
windowWidth: width,
callback: function (doc) {
doc.save(fileName);
}
autoPaging: "text",
width: width,
windowWidth: width,
callback: function (doc) {
doc.save(fileName);
}
});
}