From 5b9b37fc9b363be2989c1e9d76ab6e950cdfe2ad Mon Sep 17 00:00:00 2001 From: meteorlxy Date: Sat, 5 Dec 2020 07:23:01 +0800 Subject: [PATCH] fix(compiler-sfc): should keep template nodes with no content (#2468) close #2463 --- packages/compiler-sfc/__tests__/parse.spec.ts | 9 +++++++-- packages/compiler-sfc/src/parse.ts | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/compiler-sfc/__tests__/parse.spec.ts b/packages/compiler-sfc/__tests__/parse.spec.ts index dd16251e220..dc25c848c41 100644 --- a/packages/compiler-sfc/__tests__/parse.spec.ts +++ b/packages/compiler-sfc/__tests__/parse.spec.ts @@ -111,8 +111,13 @@ h1 { color: red } ) }) - test('should ignore nodes with no content', () => { - expect(parse(`