From 1a741a612401f97e4c2d38c7dda7752130b4085b Mon Sep 17 00:00:00 2001
From: marihachi <marihachi0620@gmail.com>
Date: Sat, 26 Jun 2021 23:00:19 +0900
Subject: [PATCH] Revert "Resolve #64"

This reverts commit b0a91ceec2ddbec19740cd1653ed4924cfe1f543.
---
 src/internal/parser.pegjs | 9 ++++-----
 src/internal/util.ts      | 4 ----
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/src/internal/parser.pegjs b/src/internal/parser.pegjs
index 7fc13ef..0adce8e 100644
--- a/src/internal/parser.pegjs
+++ b/src/internal/parser.pegjs
@@ -401,14 +401,13 @@ link
 linkLabel
 	= parts:linkLabelPart+
 {
-	return parts.flat();
+	return parts;
 }
 
 linkLabelPart
-	= "[" linkLabelPart* "]" linkLabelPart* &("](" url:linkUrl ")")
-{ return applyParser(text(), 'inlineParser'); }
-	/ !"]" n:plain
-{ return n; }
+	= url { return text(); /* text node */ }
+	/ link { return text(); /* text node */ }
+	/ !"]" n:inline { return n; }
 
 linkUrl
 	= url { return text(); }
diff --git a/src/internal/util.ts b/src/internal/util.ts
index 44c1f61..9bfec38 100644
--- a/src/internal/util.ts
+++ b/src/internal/util.ts
@@ -19,10 +19,6 @@ export function mergeText(nodes: (MfmNode | string)[]): MfmNode[] {
 			// Store the char.
 			storedChars.push(node);
 		}
-		else if (node.type == 'text') {
-			// Store the text.
-			storedChars.push(node.props.text);
-		}
 		else {
 			generateText();
 			dest.push(node);
-- 
GitLab