Skip to content

Commit

Permalink
fix: indent with tabs tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanPiercey committed Feb 25, 2022
1 parent 02fd370 commit 25c9c98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/states/CONCISE_HTML_CONTENT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const CONCISE_HTML_CONTENT: StateDefinition = {

char(code) {
if (isWhitespaceCode(code)) {
this.indent += " "; // TODO: can just be a length?
this.indent += this.data[this.pos];
} else {
const curIndent = this.indent.length;

Expand Down Expand Up @@ -125,7 +125,7 @@ export const CONCISE_HTML_CONTENT: StateDefinition = {
}

if (parentBlock.nestedIndent) {
if (parentBlock.nestedIndent.length !== this.indent.length) {
if (parentBlock.nestedIndent !== this.indent) {
this.emitError(
this.pos,
"BAD_INDENTATION",
Expand Down

0 comments on commit 25c9c98

Please sign in to comment.