pročištění kodu

This commit is contained in:
2021-01-26 23:01:39 +01:00
parent 0ade9c4503
commit 9d8acd5e03
5 changed files with 85 additions and 67 deletions

View File

@@ -5,7 +5,7 @@ class Model {
let parser = new DOMParser();
let xmlDoc = parser.parseFromString(xml, "text/xml");
this.comments = [];
let comments = [];
let comment = xmlDoc.getElementsByTagName("comment");
for (let i = 0; i < comment.length; i++) {
@@ -14,7 +14,9 @@ class Model {
let text = comment[i].getElementsByTagName("text")[0].innerHTML;
let fulltext = comment[i].getElementsByTagName("fulltext")[0].innerHTML;
this.comments.push(new Comment(start, end, text, fulltext));
comments.push(new Comment(start, end, text, fulltext));
}
return comments;
}
}