efront 4.24.3 → 4.25.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -202,7 +202,7 @@
202
202
  if (ta === " " && isEqual(tb, anchorChar)) {
203
203
  col++;
204
204
  }
205
- else if (isEqual(ta, anchorChar) && !isEqual(tb, anchorChar)) {
205
+ else if (anchorChar && tb && isEqual(ta, anchorChar) && !isEqual(tb, anchorChar)) {
206
206
  col++;
207
207
  }
208
208
  else if (anchorChar === " " && isEqual(ta, followChar) && !isEqual(tf, followChar)) {
@@ -286,6 +286,8 @@
286
286
  };
287
287
  var updatechar = function (event) {
288
288
  if (event.defaultPrevented) return;
289
+ anchorChar = "";
290
+ followChar = '';
289
291
  coderid++;
290
292
  var { anchorNode, anchorOffset } = document_selection;
291
293
  if (!coder || !anchorNode) return;
@@ -452,7 +454,7 @@
452
454
  document.execCommand('forwardDelete');
453
455
  }
454
456
  else if (data in pairsmap) {
455
- if (inText) {
457
+ if (inText && anchorChar) {
456
458
  if (/^'/.test(data)) return;
457
459
  }
458
460
  patchAfter = pairsmap[data];
@@ -460,7 +462,7 @@
460
462
  }
461
463
  else {
462
464
  if (data in pairsmap) {
463
- if (inText) {
465
+ if (inText && anchorChar) {
464
466
  if (/^'/.test(data)) return;
465
467
  }
466
468
  patchAfter = pairsmap[data];
@@ -482,6 +484,7 @@
482
484
  }
483
485
  if (patchAfter) {
484
486
  insertText(patchAfter, true);
487
+ followChar = patchAfter;
485
488
  markAnchorOffset();
486
489
  }
487
490
  return patchAfter;
@@ -1,26 +1,5 @@
1
1
  var { SCOPED, QUOTED, SPACE, STAMP, STRAP, EXPRESS, PROPERTY } = compile$common;
2
- var asm = new compile$Javascript;
3
- asm.straps = [
4
- "include", "includelib",
5
- "typedef",
6
- "proto",
7
- 'equ', "and", 'or', 'not', "sizeof",
8
- "invoke", "offset", 'addr',
9
- "end", "start",
10
- "proc", "endp", "uses",
11
- "macro", 'struct', "ends",
12
- ".if", ".elseif", '.else', '.break', '.endif', '.while', '.endw', "db", 'real4', 'real8', 'dw', 'dd', 'dq', 'byte', 'word', 'dword', 'qword', 'tword', 'dt',
13
- ];
14
- asm.control_reg = /^\.[\w]+$/;
15
- asm.stamps = [",", ":", "<", ">", "=", "&", "|", "*", "~", "!", "+", "-", '/'];
16
- asm.quotes = [
17
- ["'", "'"],
18
- ['"', '"']
19
- ];
20
- asm.comments = [
21
- [";", /(?=[\r\n\u2028\u2029])/]
22
- ];
23
-
2
+ var asm = new compile$Asm;
24
3
  var go = new compile$Javascript;
25
4
  go.straps = ["var", 'for', 'package', "import", 'type', 'func', 'struct', 'return', 'go', 'const', 'if', 'else', 'switch', 'case', 'default', 'range'];
26
5
  go.istype = function (o) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efront",
3
- "version": "4.24.3",
3
+ "version": "4.25.1",
4
4
  "description": "一个开发环境,提供一种自由的前端开发模式,也可作为辅助工具使用。",
5
5
  "main": "public/efront.js",
6
6
  "directories": {