Skip to content

Commit

Permalink
๐ŸŽจ ้€‚้…้‡ๆž„ๅŽ็š„่งฃๆž่ฝฌๆข
Browse files Browse the repository at this point in the history
  • Loading branch information
BTMuli committed Sep 5, 2024
1 parent 41f93a0 commit 6b4b1c0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/web/utils/annoParser.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* @file web/utils/annoParser.ts
* @description ่งฃๆžๆธธๆˆๅ†…ๅ…ฌๅ‘Šๆ•ฐๆฎ
* @since Beta v0.5.3
* @since Beta v0.5.5
*/

import { h, render } from "vue";
Expand Down Expand Up @@ -194,7 +194,7 @@ function parseAnnoNode(

/**
* @description ่งฃๆžๅ…ฌๅ‘Šๆฎต่ฝ
* @since Beta v0.5.3
* @since Beta v0.5.5
* @param {HTMLElement} p - ๆฎต่ฝๅ…ƒ็ด 
* @param {Record<string, string>} attr - ๅฑžๆ€ง
* @returns {TGApp.Plugins.Mys.SctPost.Base} ็ป“ๆž„ๅŒ–ๆ•ฐๆฎ
Expand Down Expand Up @@ -230,14 +230,14 @@ function parseAnnoParagraph(
span.innerHTML = p.innerHTML;
return {
insert: "",
children: [parseAnnoSpan(span, attr)],
children: [parseAnnoSpan(span, attr), { insert: "\n" }],
};
}
const child = <HTMLElement>p.childNodes[0];
if (child.tagName === "SPAN") {
return {
insert: "",
children: [parseAnnoSpan(child, attr)],
children: [parseAnnoSpan(child, attr), { insert: "\n" }],
};
}
if (child.tagName === "IMG") {
Expand Down Expand Up @@ -304,6 +304,7 @@ function parseAnnoParagraph(
}
res.children!.push(childRes);
});
res.children?.push({ insert: "\n" });
return res;
}

Expand Down

0 comments on commit 6b4b1c0

Please sign in to comment.