jsir 2.6.11 → 2.6.12

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.
Files changed (2) hide show
  1. package/cmd/oaa.js +3 -3
  2. package/package.json +1 -1
package/cmd/oaa.js CHANGED
@@ -875,7 +875,7 @@ function wrapperClass(lines, wrapperFn, trimClass = true) {
875
875
  inClass = true;
876
876
  className = reget(line, /^class\s+([a-zA-Z_$][a-zA-Z0-9_$]*)/);
877
877
  continue
878
- } else if (inClass && line.startsWith("}")) {
878
+ } else if (inClass && line.startsWith("}") && line.trim() === "}") {
879
879
  inClass = false
880
880
  results.push(...wrapperFn(className, classLines));
881
881
 
@@ -953,7 +953,7 @@ function dealStarCmd(rows, cmd, filterStr) {
953
953
  }
954
954
 
955
955
  // Check for function end and process
956
- if (fnName && line.startsWith("}") && capturingFunction) {
956
+ if (fnName && line.startsWith("}") && line.trim() === "}" && capturingFunction) {
957
957
  let functionContent = functionLines.join('\n');
958
958
  let commentContent = trimText(comments.join('\n'));
959
959
  let row = getInfo(functionContent, fnName, fnType);
@@ -2423,7 +2423,7 @@ function _addErrorTag(lines) {
2423
2423
  }
2424
2424
  functionEnd = false;
2425
2425
  }
2426
- if (line.startsWith("}") && !functionEnd) {
2426
+ if (line.startsWith("}") && line.trim() === "}" && !functionEnd) {
2427
2427
  result[i] = `${wrapperFn.length > 0 ? '},arguments)':''}}catch(e){throw($errorTag(e,$cmdName+'[${fnName}]'))}` + line;
2428
2428
  functionEnd = true;
2429
2429
  fnName = '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jsir",
3
- "version": "2.6.11",
3
+ "version": "2.6.12",
4
4
  "description": "JavaScript Script Management Tool",
5
5
  "main": "index.js",
6
6
  "scripts": {