How to use the @vue/compiler-core.TextModes.RAWTEXT function in @vue/compiler-core

To help you get started, we’ve selected a few @vue/compiler-core 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 vuejs / vue-next / packages / compiler-sfc / src / parse.ts View on Github external
getTextMode: (tag, _ns, parent) => {
      // all top level elements except <template> are parsed as raw text
      // containers
      if (!parent &amp;&amp; tag !== 'template') {
        return TextModes.RAWTEXT
      } else {
        return TextModes.DATA
      }
    },
    onError: e =&gt; {</template>
github vuejs / vue-next / packages / compiler-dom / src / parserOptionsMinimal.ts View on Github external
getTextMode(tag: string, ns: DOMNamespaces): TextModes {
    if (ns === DOMNamespaces.HTML) {
      if (tag === 'textarea' || tag === 'title') {
        return TextModes.RCDATA
      }
      if (isRawTextContainer(tag)) {
        return TextModes.RAWTEXT
      }
    }
    return TextModes.DATA
  }
}