Skip to content

Commit 802f2b4

Browse files
committed
fix(Compiler): update simple text part handling to return JSON string for trimmed text; improve consistency in text processing
1 parent d35c782 commit 802f2b4

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

packages/compiler/grammar.pegjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ simpleTextContent "simple text content"
307307
simpleTextPart "simple text part"
308308
= !("@for" / "@if") text:$([^<{@]+) {
309309
const trimmed = text.trim();
310-
return trimmed ? `'${text}'` : null;
310+
return trimmed ? JSON.stringify(trimmed) : null;
311311
}
312312

313313
simpleDynamicPart "simple dynamic part"

sample/src/main.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import '@pixi/layout/devtools';
21
import { bootstrapCanvas } from 'canvasengine';
32
//import App from './test.ce'
43
// Uncomment to test shake directive examples:

0 commit comments

Comments
 (0)