Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bezoerb committed Sep 22, 2024
1 parent f826233 commit d64b907
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ class Dom {
this.bodyElements = [];

this.indent = detectIndent(html);
this.headIndent = detectIndent(this.document.querySelector('head').innerHTML);
this.bodyIndent = detectIndent(this.document.querySelector('body').innerHTML);
}

serialize() {
Expand Down Expand Up @@ -190,8 +188,8 @@ class Dom {
appendStyles(css, referenceNode) {
const styles = this.createStyleNode(css);
referenceNode.append(styles);
styles.before(this.document.createTextNode(this.headIndent.indent));
styles.after(this.document.createTextNode(`\n${this.headIndent.indent}`));
styles.before(this.document.createTextNode(this.indent.indent));
styles.after(this.document.createTextNode(`\n${this.indent.indent}`));
}

addNoscript(link) {
Expand Down

0 comments on commit d64b907

Please sign in to comment.