feat(compiler): preserve whitespace in pre tag, add tests

This commit is contained in:
Evan You
2019-10-24 16:42:09 -04:00
parent 9298f46f92
commit eb20730a67
4 changed files with 89 additions and 27 deletions

View File

@@ -15,8 +15,8 @@ export const enum DOMNamespaces {
export const parserOptionsMinimal: ParserOptions = {
isVoidTag,
isNativeTag: tag => isHTMLTag(tag) || isSVGTag(tag),
isPreTag: tag => tag === 'pre',
// https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher
getNamespace(tag: string, parent: ElementNode | undefined): DOMNamespaces {