@@ -6,6 +6,7 @@ interface ElementWithAttributes {
6
6
7
7
export default class Processor {
8
8
static BASE_RE = / \{ \: [ ] * ( [ ^ \} \n ] [ ^ \} \n ] * ) [ ] * \} / ;
9
+ static ONLY_RE = / ^ \{ \: [ ] * ( [ ^ \} \n ] [ ^ \} \n ] * ) [ ] * \} $ / ;
9
10
static BLOCK_RE = / \n [ ] * \{ \: ? [ ] * ( [ ^ \} \n ] [ ^ \} \n ] * ) [ ] * \} [ ] * $ / ;
10
11
11
12
constructor ( private topLevelElement : HTMLElement ) { }
@@ -103,7 +104,6 @@ export default class Processor {
103
104
104
105
// Text content of this node and *not* the children.
105
106
const text = this . getTopLevelText ( el ) ;
106
- console . log ( "🚀 ~ file: processor.ts ~ line 102 ~ el" , text ) ;
107
107
108
108
if ( Processor . BLOCK_RE . test ( text ) ) {
109
109
// Attributes should apply to the whole block.
@@ -129,7 +129,6 @@ export default class Processor {
129
129
}
130
130
} else if ( Processor . BASE_RE . test ( text ) ) {
131
131
// Attributes are inline.
132
- console . log ( Processor . BASE_RE . test ( text ) ) ;
133
132
// Get the text nodes that contains the attribute string.
134
133
let textNode = Array . from ( el . childNodes ) . find (
135
134
( node ) =>
@@ -147,10 +146,6 @@ export default class Processor {
147
146
148
147
// Collapsible elements are a special case due to the collapse handle.
149
148
if ( sibling && sibling . hasClass ( "collapse-indicator" ) ) {
150
- console . log (
151
- "🚀 ~ file: processor.ts ~ line 150 ~ Processor.BASE_RE.test(text)" ,
152
- Processor . BASE_RE . test ( text )
153
- ) ;
154
149
sibling = sibling . parentElement ;
155
150
}
156
151
0 commit comments