Skip to content

Commit d9a11a7

Browse files
committed
Remove unneeded logic
1 parent 98df71e commit d9a11a7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ function wrap(tree, file) {
117117
function element(node) {
118118
var empty = voids.indexOf(node.tagName) !== -1;
119119

120-
parser._processToken(startTag(node, empty), ns.html);
120+
parser._processToken(startTag(node), ns.html);
121121

122122
all(node.children);
123123

@@ -208,8 +208,9 @@ function run(p) {
208208
}
209209
}
210210

211-
function startTag(node, empty) {
211+
function startTag(node) {
212212
var start = pos.start(node);
213+
var end = pos.end(node);
213214

214215
return {
215216
type: START_TAG_TOKEN,
@@ -220,13 +221,13 @@ function startTag(node, empty) {
220221
line: start.line,
221222
col: start.column,
222223
startOffset: start.offset,
223-
endOffset: start.offset,
224+
endOffset: end.offset,
224225
attrs: {},
225226
startTag: {
226227
line: start.line,
227228
col: start.column,
228229
startOffset: start.offset,
229-
endOffset: empty ? pos.end(node).offset : start.offset
230+
endOffset: end.offset
230231
}
231232
}
232233
};

0 commit comments

Comments
 (0)