]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore(compile-core): removed the optional tag parameter from condenseWhitespace's...
authorpengbo <57180744+PengBoUESTC@users.noreply.github.com>
Fri, 6 Jun 2025 00:25:02 +0000 (08:25 +0800)
committerGitHub <noreply@github.com>
Fri, 6 Jun 2025 00:25:02 +0000 (08:25 +0800)
packages/compiler-core/src/parser.ts
packages/compiler-core/src/transforms/vFor.ts

index 7d1b01360c49f9b804a5069468cdeaca49d15819..3eb3a976f4e472797f8a974bc9e8a8c718c36765 100644 (file)
@@ -647,7 +647,7 @@ function onCloseTag(el: ElementNode, end: number, isImplied = false) {
 
   // whitespace management
   if (!tokenizer.inRCDATA) {
-    el.children = condenseWhitespace(children, tag)
+    el.children = condenseWhitespace(children)
   }
 
   if (ns === Namespaces.HTML && currentOptions.isIgnoreNewlineTag(tag)) {
@@ -832,10 +832,7 @@ function isUpperCase(c: number) {
 }
 
 const windowsNewlineRE = /\r\n/g
-function condenseWhitespace(
-  nodes: TemplateChildNode[],
-  tag?: string,
-): TemplateChildNode[] {
+function condenseWhitespace(nodes: TemplateChildNode[]): TemplateChildNode[] {
   const shouldCondense = currentOptions.whitespace !== 'preserve'
   let removedWhitespace = false
   for (let i = 0; i < nodes.length; i++) {
index 0dca0ba9ab437216347a353dcabcec01d44fc07b..a639caf2caef793e59e51a51375a108e5517310b 100644 (file)
@@ -263,7 +263,7 @@ export function processFor(
   dir: DirectiveNode,
   context: TransformContext,
   processCodegen?: (forNode: ForNode) => (() => void) | undefined,
-) {
+): (() => void) | undefined {
   if (!dir.exp) {
     context.onError(
       createCompilerError(ErrorCodes.X_V_FOR_NO_EXPRESSION, dir.loc),