From c403c39126f399a2826f31709adeb367fa640fca Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 24 Mar 2020 18:29:15 -0400 Subject: [PATCH] chore: improve parser option comments [ci skip] --- packages/compiler-core/src/options.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/compiler-core/src/options.ts b/packages/compiler-core/src/options.ts index 68a8e328..9bd8950b 100644 --- a/packages/compiler-core/src/options.ts +++ b/packages/compiler-core/src/options.ts @@ -9,11 +9,16 @@ import { import { ParserPlugin } from '@babel/parser' export interface ParserOptions { - isVoidTag?: (tag: string) => boolean // e.g. img, br, hr - isNativeTag?: (tag: string) => boolean // e.g. loading-indicator in weex - isPreTag?: (tag: string) => boolean // e.g.
 where whitespace is intact
-  isCustomElement?: (tag: string) => boolean
+  // e.g. platform native elements, e.g. 
for browsers + isNativeTag?: (tag: string) => boolean + // e.g. native elements that can self-close, e.g. ,
,
+ isVoidTag?: (tag: string) => boolean + // e.g. elements that should preserve whitespace inside, e.g.
+  isPreTag?: (tag: string) => boolean
+  // platform-specific built-in components e.g. 
   isBuiltInComponent?: (tag: string) => symbol | void
+  // separate option for end users to extend the native elements list
+  isCustomElement?: (tag: string) => boolean
   getNamespace?: (tag: string, parent: ElementNode | undefined) => Namespace
   getTextMode?: (
     tag: string,