@lvce-editor/chat-view 3.8.0 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chatViewWorkerMain.js +13 -1
- package/package.json +1 -1
|
@@ -6918,6 +6918,12 @@ const getInlineNodeDom = inlineNode => {
|
|
|
6918
6918
|
type: Strong
|
|
6919
6919
|
}, text(inlineNode.text)];
|
|
6920
6920
|
}
|
|
6921
|
+
if (inlineNode.type === 'italic') {
|
|
6922
|
+
return [{
|
|
6923
|
+
childCount: 1,
|
|
6924
|
+
type: Em
|
|
6925
|
+
}, text(inlineNode.text)];
|
|
6926
|
+
}
|
|
6921
6927
|
return [{
|
|
6922
6928
|
childCount: 1,
|
|
6923
6929
|
className: ChatMessageLink,
|
|
@@ -7583,7 +7589,7 @@ const getToolCallsDom = message => {
|
|
|
7583
7589
|
|
|
7584
7590
|
const orderedListItemRegex = /^\s*\d+\.\s+(.*)$/;
|
|
7585
7591
|
const unorderedListItemRegex = /^\s*[-*]\s+(.*)$/;
|
|
7586
|
-
const markdownInlineRegex = /\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)
|
|
7592
|
+
const markdownInlineRegex = /\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*|\*([^*]+)\*/g;
|
|
7587
7593
|
const markdownTableSeparatorCellRegex = /^:?-{3,}:?$/;
|
|
7588
7594
|
const fencedCodeBlockRegex = /^```/;
|
|
7589
7595
|
const markdownHeadingRegex = /^\s*(#{1,6})\s+(.*)$/;
|
|
@@ -7646,6 +7652,7 @@ const parseInlineNodes = value => {
|
|
|
7646
7652
|
const linkText = match[1];
|
|
7647
7653
|
const href = match[2];
|
|
7648
7654
|
const boldText = match[3];
|
|
7655
|
+
const italicText = match[4];
|
|
7649
7656
|
const index = match.index ?? 0;
|
|
7650
7657
|
if (index > lastIndex) {
|
|
7651
7658
|
nodes.push({
|
|
@@ -7664,6 +7671,11 @@ const parseInlineNodes = value => {
|
|
|
7664
7671
|
text: boldText,
|
|
7665
7672
|
type: 'bold'
|
|
7666
7673
|
});
|
|
7674
|
+
} else if (italicText) {
|
|
7675
|
+
nodes.push({
|
|
7676
|
+
text: italicText,
|
|
7677
|
+
type: 'italic'
|
|
7678
|
+
});
|
|
7667
7679
|
}
|
|
7668
7680
|
lastIndex = index + fullMatch.length;
|
|
7669
7681
|
}
|