File tree Expand file tree Collapse file tree 7 files changed +570
-426
lines changed
glass-easel-template-compiler Expand file tree Collapse file tree 7 files changed +570
-426
lines changed Original file line number Diff line number Diff line change 11name : build-and-test
22on :
33 push :
4+ branches : ["master"]
45 pull_request :
56 branches :
67 - master
@@ -25,11 +26,10 @@ jobs:
2526 uses : actions/setup-node@v3
2627 with :
2728 node-version : ${{ matrix.node-version }}
28- cache : ' pnpm'
2929 - name : Install
3030 uses : pnpm/action-setup@v2
3131 with :
32- version : latest
32+ version : 9
3333 run_install : |
3434 - recursive: true
3535 args: [--frozen-lockfile, --strict-peer-dependencies]
4141 - name : Setup wasm-pack
42424343 with :
44- version : ' v0.10.3 '
44+ version : ' v0.13.1 '
4545 - name : Build
4646 run : |
4747 pnpm -r run build
Original file line number Diff line number Diff line change @@ -30,15 +30,14 @@ jobs:
3030 uses : pnpm/action-setup@v2
3131 with :
3232 version : latest
33- - name : Setup node ${{ matrix.node-version }}
33+ - name : Setup node
3434 uses : actions/setup-node@v3
3535 with :
36- node-version : ${{ matrix.node-version }}
37- cache : ' pnpm'
36+ node-version : 20
3837 - name : Install
3938 uses : pnpm/action-setup@v2
4039 with :
41- version : latest
40+ version : 9
4241 run_install : |
4342 - recursive: true
4443 args: [--frozen-lockfile, --strict-peer-dependencies]
Original file line number Diff line number Diff line change 2424 "browser" : " pkg/glass_easel_template_compiler.js" ,
2525 "types" : " pkg/glass_easel_template_compiler.d.ts" ,
2626 "scripts" : {
27- "build" : " wasm-pack build --target bundler && rollup -o pkg/glass_easel_template_compiler_bg.cjs.js -f cjs pkg/glass_easel_template_compiler_bg.js"
28- }
27+ "build" : " wasm-pack build --target bundler && mv pkg/package.json pkg/package.json.orig && rollup -o pkg/glass_easel_template_compiler_bg.cjs.js -f cjs pkg/glass_easel_template_compiler_bg.js"
28+ },
29+ "sideEffects" : [
30+ " pkg/glass_easel_template_compiler.js" ,
31+ " pkg/snippets/*"
32+ ]
2933}
Original file line number Diff line number Diff line change @@ -4,19 +4,6 @@ use compact_str::CompactString;
44use regex:: { Captures , Regex } ;
55use std:: borrow:: Cow ;
66
7- pub ( crate ) fn escape_html_text ( s : & str ) -> Cow < ' _ , str > {
8- lazy_static ! {
9- static ref REGEX : Regex = Regex :: new( "[<>\" &]" ) . unwrap( ) ;
10- }
11- REGEX . replace_all ( s, |caps : & Captures | match & caps[ 0 ] {
12- "<" => "<" . to_owned ( ) ,
13- ">" => ">" . to_owned ( ) ,
14- "\" " => """ . to_owned ( ) ,
15- "&" => "&" . to_owned ( ) ,
16- _ => unreachable ! ( ) ,
17- } )
18- }
19-
207pub ( crate ) fn escape_html_body ( s : & str ) -> Cow < ' _ , str > {
218 lazy_static ! {
229 static ref REGEX : Regex = Regex :: new( "[<\" &]" ) . unwrap( ) ;
You can’t perform that action at this time.
0 commit comments