豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Commit 9f448b7

Browse files
authored
refactor: remove dead code (#1233)
1 parent a3e4561 commit 9f448b7

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/parser/scalar.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@ module.exports = {
103103
let offset = 0;
104104
let leadingWhitespaceCharCount = 0;
105105
/*
106-
* @var inCoutingState {boolean} reset to true after a new line
106+
* @var inCountingState {boolean} reset to true after a new line
107107
* @private
108108
*/
109-
let inCoutingState = true;
109+
let inCountingState = true;
110110
const chToCheck = indentation_uses_spaces ? " " : "\t";
111111
let inCheckState = false;
112112
if (!first_encaps_node) {
@@ -119,14 +119,12 @@ module.exports = {
119119
offset++;
120120
}
121121
while (offset < textSize) {
122-
if (inCoutingState) {
122+
if (inCountingState) {
123123
if (text[offset] === chToCheck) {
124124
leadingWhitespaceCharCount++;
125125
} else {
126126
inCheckState = true;
127127
}
128-
} else {
129-
inCoutingState = false;
130128
}
131129

132130
if (
@@ -143,7 +141,7 @@ module.exports = {
143141

144142
if (text[offset] === "\n") {
145143
// Reset counting state
146-
inCoutingState = true;
144+
inCountingState = true;
147145
leadingWhitespaceCharCount = 0;
148146
}
149147
offset++;

0 commit comments

Comments
 (0)