File tree Expand file tree Collapse file tree 3 files changed +19
-11
lines changed Expand file tree Collapse file tree 3 files changed +19
-11
lines changed Original file line number Diff line number Diff line change @@ -366,21 +366,22 @@ const contentNav =
366
366
) ,
367
367
div . class `mt-6 pl-3` (
368
368
/* Place this tag where you want the button to render. */
369
- a . class `github-button` . href `https://github.com/mudgen/webscript`
370
- [ "data-size" ] `large`
371
- [ "data-show-count" ] `true`
372
- [ "aria-label" ] `Star Webscript on GitHub` `Star` ,
369
+ a . class `github-button`
370
+ . href `https://github.com/mudgen/webscript`
371
+ . data·size `large`
372
+ . data·show·count `true`
373
+ . aria·label `Star Webscript on GitHub` `Star` ,
373
374
div . class `mt-2` (
374
375
a . class `github-button` . href `https://github.com/sponsors/mudgen`
375
- [ " data- size" ] `large`
376
- [ " data- icon" ] `octicon-heart`
377
- [ "ariaLabel" ] `Sponsor @ntkme on GitHub` `Sponsor`
376
+ . data· size `large`
377
+ . data· icon `octicon-heart`
378
+ . aria·label `Sponsor @mudgen on GitHub` `Sponsor`
378
379
) ,
379
380
div . class `mt-2` (
380
381
a . class `twitter-follow-button` . href `https://twitter.com/mudgen?ref_src=twsrc%5Etfw`
381
- [ " data- size" ] `large`
382
- [ " data- show- count" ] `false`
383
- [ " data- show- screen- name" ] `false`
382
+ . data· size `large`
383
+ . data· show· count `false`
384
+ . data· show· screen· name `false`
384
385
`Follow @mudgen`
385
386
)
386
387
) ,
Original file line number Diff line number Diff line change @@ -346,6 +346,8 @@ function out(o, indent) {
346
346
}
347
347
}
348
348
349
+ let hyphen = new RegExp ( "-" , "g" ) ;
350
+
349
351
function camelCase ( hyphenText ) {
350
352
return hyphenText . split ( "-" )
351
353
. map ( ( text , index ) => {
@@ -375,7 +377,7 @@ function traverse(element) {
375
377
else {
376
378
let name = a . name ;
377
379
if ( name . indexOf ( '-' ) > - 1 ) {
378
- name = camelCase ( name ) ;
380
+ name = name . replace ( hyphen , "·" ) ;
379
381
}
380
382
o . attrs . push ( `.${ name } \`${ a . value } \`` ) ;
381
383
}
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ function templateValues(args) {
13
13
return result ;
14
14
}
15
15
16
+ let interpunct = new RegExp ( "·" , "g" ) ;
17
+
16
18
function createInitialBuilder ( constructor , type ) {
17
19
function setPropertyValue ( ...args ) {
18
20
let [ value ] = args ;
@@ -73,6 +75,9 @@ function createInitialBuilder(constructor, type) {
73
75
return setPropsValues ;
74
76
}
75
77
else if ( typeof prop === "string" ) {
78
+ if ( prop . indexOf ( "·" ) !== - 1 ) {
79
+ prop = prop . replace ( interpunct , "-" ) ;
80
+ }
76
81
if ( prop . endsWith ( "Value" ) && prop . length > 5 ) {
77
82
return target . __element_info__ . props [ prop . slice ( 0 , - 5 ) ] ;
78
83
}
You can’t perform that action at this time.
0 commit comments