How to use the simple-html-tokenizer.TokenizerState.attributeValueSingleQuoted function in simple-html-tokenizer

To help you get started, we’ve selected a few simple-html-tokenizer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github glimmerjs / glimmer-vm / packages / @glimmer / syntax / lib / hbs / parse / html.ts View on Github external
appendBlock(node: hbs.BlockStatement): void {
    switch (this.htmlParser.tokenizer.state) {
      case TokenizerState.attributeValueSingleQuoted:
      case TokenizerState.attributeValueDoubleQuoted:
      case TokenizerState.beforeAttributeValue: {
        throw new Error(`Can't append a block to an attribute`);
      }
      default:
        this.parent.appendNode(node);
    }
  }