Skip to content

Commit

Permalink
修正分词提示定位
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudcome committed Jun 20, 2016
1 parent fd611d0 commit 233d55c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blear.classes.template",
"version": "1.0.23",
"version": "1.0.24",
"description": "指令类型模板引擎",
"scripts": {
"live": "browser-sync start --config bs-config.js",
Expand Down
2 changes: 1 addition & 1 deletion src/_lexer.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var trackErrorPos = (function () {
var lineLen = (lines[i] || "").length;

if (tmpLen + lineLen > pos) {
return {num: i, line: lines[i], start: pos - i - tmpLen, prev: lines[i - 1], next: lines[i + 1]};
return {num: i, line: lines[i], start: pos - 1 - tmpLen, prev: lines[i - 1], next: lines[i + 1]};
}
// 1 is for the linebreak
tmpLen = tmpLen + lineLen;
Expand Down

0 comments on commit 233d55c

Please sign in to comment.