fix(wh): codeblock not merging properly when there's nothing infront of it
Build and Deploy / build-and-deploy (push) Successful in 1m35s

This commit is contained in:
2026-07-14 17:03:55 +07:00 Unverified
parent b793a6ca9b
commit 00935ebd6c
+1 -1
View File
@@ -162,7 +162,7 @@ function merge(
typeof b === "string"
) {
const combined = (() => {
const CODEBLOCK_MATCHER = /^([^`]+)```(?:([a-z]*)\n)?([^`]+)```\n?/m;
const CODEBLOCK_MATCHER = /^([^`]*)```(?:([a-z]*)\n)?([\s\S]*?)```\n?$/;
const [ma, mb] = [a.match(CODEBLOCK_MATCHER), b.match(CODEBLOCK_MATCHER)];
log.debug`${ma} ${mb}`;
if (ma && mb && ma[1] === mb[1]) {