This repository was archived by the owner on Sep 13, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,5 +105,5 @@ out.html
105105.tern-port
106106
107107# playground of vm module
108- vm. playground.js
108+ playground.js
109109srcold /
Original file line number Diff line number Diff line change @@ -5,5 +5,5 @@ examples/
55.eslintignore
66.prettierrc
77.prettierignore
8- vm. playground.js
8+ playground.js
99.vscode /
Original file line number Diff line number Diff line change 11{
22 "name" : " abell-renderer" ,
3- "version" : " 0.4.1 " ,
3+ "version" : " 0.4.2 " ,
44 "description" : " JavaScript based Template Engine. Compiles .abell files to .html" ,
55 "main" : " src/index.js" ,
66 "bin" : {
Original file line number Diff line number Diff line change @@ -172,10 +172,10 @@ function parseComponent(
172172 } else if ( ! isCss && contentMatch [ 2 ] . includes ( 'scopedSelector' ) ) {
173173 // if it is javascript then scope it by injecting scopedSelector functions
174174 // prettier-ignore
175- content =
176- `scopedSelector = (queryString) => document.querySelector(queryString + '[data-abell- ${ componentHash } ]');` + // eslint-disable-line max-len
177- `scopedSelectorAll = (queryString) => document.querySelectorAll(queryString + ' [data-abell-${ componentHash } ]');` // eslint-disable-line max-len
178- + contentMatch [ 2 ] ;
175+ content = contentMatch [ 2 ] . replace (
176+ / s c o p e d ( S e l e c t o r | S e l e c t o r A l l ) \( ( [ ' " ` ] . * ? [ " ' ` ] ) \) / g ,
177+ `document.query$1($2 + " [data-abell-${ componentHash } ]")`
178+ ) ;
179179 } else {
180180 content = contentMatch [ 2 ] ;
181181 }
You can’t perform that action at this time.
0 commit comments