File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5470,17 +5470,17 @@ function pipes(elem, stop = false) {
54705470 var index = optsArray . length ;
54715471 if ( index == 0 ) {
54725472 // Handle case where no elements are present
5473- } else if ( index >= 1 ) {
5473+ } else if ( index >= 1 && optsArray [ 0 ] !== '' | undefined ) {
54745474 console . log ( optsArray [ 0 ] )
54755475 // Handle case where only one element is present
54765476 if ( document . getElementById ( optsArray [ 0 ] ) . hasAttribute ( "inline" ) ) {
54775477 dotPipe . register ( ) ;
54785478 dotPipe . runInline ( document . getElementById ( optsArray [ 0 ] ) . id ) ;
54795479 }
5480- if ( optsArray . length == 1 ) { }
5481- else {
5482- elem . setAttribute ( "turn" , optsArray . slice ( 0 , - 1 ) . join ( ";" ) + ";" + optsArray [ 0 ] ) ;
5483- }
5480+ const opt = optsArray . shift ( ) ; // take first element
5481+ optsArray . push ( opt ) ; // push it to the end
5482+ elem . setAttribute ( "turn" , optsArray . join ( ";" ) ) ; // re-assign rotated list
5483+ console . log ( "Next turn:" , optsArray [ 0 ] ) ;
54845484 }
54855485 }
54865486 if ( elem . hasAttribute ( "x-toggle" ) ) {
Original file line number Diff line number Diff line change 55 "> </ div >
66< div id ="outputDiv "> </ div >
77
8- < button id ="run " turn ="example "> Show Greeting</ button >
8+ < button id ="run " turn ="example;example1 "> Show Greeting</ button >
9+ < div id ="example1 " inline ="
10+ |&greeting:Is this necessary?
11+ |$outputDiv1:!greeting
12+ |%shout:[!greeting]
13+ "> </ div >
14+ < div id ="outputDiv1 "> </ div >
915
1016< script src ="./inline/dotpipe.js "> </ script >
1117
1218< script >
1319function shout ( text ) {
14- console . log ( 'Shout:' , text . toUpperCase ( ) ) ;
20+ console . log ( 'Shout:' , text ) ;
1521 return text ;
1622}
1723
You can’t perform that action at this time.
0 commit comments