Skip to content

Commit

Permalink
feat: beautify code and support sourcemap, #12
Browse files Browse the repository at this point in the history
  • Loading branch information
Javey committed Aug 14, 2018
1 parent 22d1a7e commit 2e49cc8
Show file tree
Hide file tree
Showing 8 changed files with 1,298 additions and 671 deletions.
614 changes: 412 additions & 202 deletions dist/index.js

Large diffs are not rendered by default.

614 changes: 412 additions & 202 deletions dist/vdt.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vdt.min.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/lib/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ Parser.prototype = {
) {
if (ch === '\n') {
this._updateLine();
} else {
this._updateIndex();
}
this._updateIndex();
break;
Expand Down Expand Up @@ -661,7 +663,7 @@ Parser.prototype = {
_isElementStart: function(index = this.index) {
return this._char(index) === '<' &&
(
this._isExpect('<!--') ||
this._isExpect('<!--', index) ||
elementNameRegexp.test(this.source.slice(index))
);
},
Expand Down
Loading

0 comments on commit 2e49cc8

Please sign in to comment.