File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -359,19 +359,18 @@ export class HedStringTokenizer {
359
359
}
360
360
}
361
361
362
- checkForBadPlaceholderIssues ( i ) {
362
+ checkForBadPlaceholderIssues ( ) {
363
363
const tokenSplit = this . state . currentToken . split ( CHARACTERS . PLACEHOLDER )
364
364
if ( tokenSplit . length === 1 ) {
365
365
// No placeholders to worry about for this tag
366
366
return false
367
- } else if ( tokenSplit . length > 2 ) {
368
- // Multiple placeholders
369
- return true
370
- } else if ( ! tokenSplit [ 0 ] . endsWith ( CHARACTERS . SLASH ) ) {
371
- // A placeholder must come immediately after a slash
372
- return true
373
- } else if ( tokenSplit [ 1 ] . trim ( ) . length > 0 && tokenSplit [ 1 ] [ 0 ] !== CHARACTERS . BLANK ) {
374
- // If units, blank must follow placeholder
367
+ }
368
+ if (
369
+ tokenSplit . length > 2 ||
370
+ ! tokenSplit [ 0 ] . endsWith ( CHARACTERS . SLASH ) || // A placeholder must be after a slash
371
+ ( tokenSplit [ 1 ] . trim ( ) . length > 0 && tokenSplit [ 1 ] [ 0 ] !== CHARACTERS . BLANK )
372
+ ) {
373
+ // If units, blank after placeholder
375
374
return true
376
375
}
377
376
return false
You can’t perform that action at this time.
0 commit comments