@junnyontop-pixel/neo-app 1.1.13 → 1.1.14

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.
@@ -5,7 +5,7 @@ export class NeoParser {
5
5
  if (scriptMatch) scriptContent = scriptMatch[1].trim();
6
6
 
7
7
  // 태그 블록만 추출하기 위해 스크립트 제외
8
- const cleanSource = source.replace(/@Script\s*\{[\s\S]*?\}/, "").trim();
8
+ const cleanSource = source.replace(/@Script\s*\{[\s\S]*?\}/, "").trim();
9
9
 
10
10
  const root = this.parseRecursive(cleanSource);
11
11
  return { root, scriptContent };
@@ -64,8 +64,19 @@ export class NeoParser {
64
64
  const childNode = this.parseRecursive(remainingText.substring(childMatch.index));
65
65
  if (childNode) {
66
66
  node.children.push(childNode);
67
- // 중복 탐색 방지를 위해 인덱스 건너뛰기 로직 생략 (현재 구조 최적화)
68
- break; // 예시용 단일 자식 우선 처리, 실제론 루프 최적화 필요
67
+
68
+ // 자식 노드의 지점을 찾아서 다음 검색 위치를 조정
69
+ let braceCount = 1;
70
+ let i = remainingText.indexOf('{', childMatch.index) + 1;
71
+
72
+ while (braceCount > 0 && i < remainingText.length) {
73
+ if (remainingText[i] === '{') braceCount++;
74
+ else if (remainingText[i] === '}') braceCount--;
75
+ i++;
76
+ }
77
+
78
+ // 정규식의 다음 검색 시작 위치를 자식 노드가 끝난 지점(i)으로 옮겨줘
79
+ childRegex.lastIndex = i;
69
80
  }
70
81
  }
71
82
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@junnyontop-pixel/neo-app",
3
- "version": "1.1.13",
3
+ "version": "1.1.14",
4
4
  "description": "나만의 커스텀 프레임워크 Neo",
5
5
  "main": "core/NeoCore.js",
6
6
  "type": "module",