Merge pull request #130 from pyscript/dedent_code

Fix dedenting of <py-script> code
This commit is contained in:
Fabio Pliger
2022-05-03 11:42:08 -05:00
committed by GitHub

View File

@@ -9,8 +9,8 @@ const getLastPath = function (str) {
};
function htmlDecode(input) {
const doc = new DOMParser().parseFromString(input, 'text/html');
return ltrim(doc.documentElement.textContent);
const doc = new DOMParser().parseFromString(ltrim(input), 'text/html');
return doc.documentElement.textContent;
}
function ltrim(code: string): string {