Spaces:
Sleeping
Sleeping
fix <br> in markdown tables
Browse files- web/package-lock.json +70 -0
- web/package.json +1 -0
- web/src/App.tsx +4 -2
- web/vite.config.ts +1 -0
web/package-lock.json
CHANGED
|
@@ -15,6 +15,7 @@
|
|
| 15 |
"react-markdown": "^9.0.1",
|
| 16 |
"react-syntax-highlighter": "^15.5.0",
|
| 17 |
"rehype-katex": "^7.0.0",
|
|
|
|
| 18 |
"remark-gfm": "^4.0.1",
|
| 19 |
"remark-math": "^6.0.0"
|
| 20 |
},
|
|
@@ -2075,6 +2076,31 @@
|
|
| 2075 |
"url": "https://opencollective.com/unified"
|
| 2076 |
}
|
| 2077 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2078 |
"node_modules/hast-util-to-jsx-runtime": {
|
| 2079 |
"version": "2.3.6",
|
| 2080 |
"resolved": "https://registry.npmjs.org/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.6.tgz",
|
|
@@ -2102,6 +2128,25 @@
|
|
| 2102 |
"url": "https://opencollective.com/unified"
|
| 2103 |
}
|
| 2104 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2105 |
"node_modules/hast-util-to-text": {
|
| 2106 |
"version": "4.0.2",
|
| 2107 |
"resolved": "https://registry.npmjs.org/hast-util-to-text/-/hast-util-to-text-4.0.2.tgz",
|
|
@@ -2221,6 +2266,16 @@
|
|
| 2221 |
"url": "https://opencollective.com/unified"
|
| 2222 |
}
|
| 2223 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2224 |
"node_modules/inline-style-parser": {
|
| 2225 |
"version": "0.2.7",
|
| 2226 |
"resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.7.tgz",
|
|
@@ -3744,6 +3799,21 @@
|
|
| 3744 |
"url": "https://opencollective.com/unified"
|
| 3745 |
}
|
| 3746 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3747 |
"node_modules/remark-gfm": {
|
| 3748 |
"version": "4.0.1",
|
| 3749 |
"resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-4.0.1.tgz",
|
|
|
|
| 15 |
"react-markdown": "^9.0.1",
|
| 16 |
"react-syntax-highlighter": "^15.5.0",
|
| 17 |
"rehype-katex": "^7.0.0",
|
| 18 |
+
"rehype-raw": "^7.0.0",
|
| 19 |
"remark-gfm": "^4.0.1",
|
| 20 |
"remark-math": "^6.0.0"
|
| 21 |
},
|
|
|
|
| 2076 |
"url": "https://opencollective.com/unified"
|
| 2077 |
}
|
| 2078 |
},
|
| 2079 |
+
"node_modules/hast-util-raw": {
|
| 2080 |
+
"version": "9.1.0",
|
| 2081 |
+
"resolved": "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-9.1.0.tgz",
|
| 2082 |
+
"integrity": "sha512-Y8/SBAHkZGoNkpzqqfCldijcuUKh7/su31kEBp67cFY09Wy0mTRgtsLYsiIxMJxlu0f6AA5SUTbDR8K0rxnbUw==",
|
| 2083 |
+
"license": "MIT",
|
| 2084 |
+
"dependencies": {
|
| 2085 |
+
"@types/hast": "^3.0.0",
|
| 2086 |
+
"@types/unist": "^3.0.0",
|
| 2087 |
+
"@ungap/structured-clone": "^1.0.0",
|
| 2088 |
+
"hast-util-from-parse5": "^8.0.0",
|
| 2089 |
+
"hast-util-to-parse5": "^8.0.0",
|
| 2090 |
+
"html-void-elements": "^3.0.0",
|
| 2091 |
+
"mdast-util-to-hast": "^13.0.0",
|
| 2092 |
+
"parse5": "^7.0.0",
|
| 2093 |
+
"unist-util-position": "^5.0.0",
|
| 2094 |
+
"unist-util-visit": "^5.0.0",
|
| 2095 |
+
"vfile": "^6.0.0",
|
| 2096 |
+
"web-namespaces": "^2.0.0",
|
| 2097 |
+
"zwitch": "^2.0.0"
|
| 2098 |
+
},
|
| 2099 |
+
"funding": {
|
| 2100 |
+
"type": "opencollective",
|
| 2101 |
+
"url": "https://opencollective.com/unified"
|
| 2102 |
+
}
|
| 2103 |
+
},
|
| 2104 |
"node_modules/hast-util-to-jsx-runtime": {
|
| 2105 |
"version": "2.3.6",
|
| 2106 |
"resolved": "https://registry.npmjs.org/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.6.tgz",
|
|
|
|
| 2128 |
"url": "https://opencollective.com/unified"
|
| 2129 |
}
|
| 2130 |
},
|
| 2131 |
+
"node_modules/hast-util-to-parse5": {
|
| 2132 |
+
"version": "8.0.1",
|
| 2133 |
+
"resolved": "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-8.0.1.tgz",
|
| 2134 |
+
"integrity": "sha512-MlWT6Pjt4CG9lFCjiz4BH7l9wmrMkfkJYCxFwKQic8+RTZgWPuWxwAfjJElsXkex7DJjfSJsQIt931ilUgmwdA==",
|
| 2135 |
+
"license": "MIT",
|
| 2136 |
+
"dependencies": {
|
| 2137 |
+
"@types/hast": "^3.0.0",
|
| 2138 |
+
"comma-separated-tokens": "^2.0.0",
|
| 2139 |
+
"devlop": "^1.0.0",
|
| 2140 |
+
"property-information": "^7.0.0",
|
| 2141 |
+
"space-separated-tokens": "^2.0.0",
|
| 2142 |
+
"web-namespaces": "^2.0.0",
|
| 2143 |
+
"zwitch": "^2.0.0"
|
| 2144 |
+
},
|
| 2145 |
+
"funding": {
|
| 2146 |
+
"type": "opencollective",
|
| 2147 |
+
"url": "https://opencollective.com/unified"
|
| 2148 |
+
}
|
| 2149 |
+
},
|
| 2150 |
"node_modules/hast-util-to-text": {
|
| 2151 |
"version": "4.0.2",
|
| 2152 |
"resolved": "https://registry.npmjs.org/hast-util-to-text/-/hast-util-to-text-4.0.2.tgz",
|
|
|
|
| 2266 |
"url": "https://opencollective.com/unified"
|
| 2267 |
}
|
| 2268 |
},
|
| 2269 |
+
"node_modules/html-void-elements": {
|
| 2270 |
+
"version": "3.0.0",
|
| 2271 |
+
"resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-3.0.0.tgz",
|
| 2272 |
+
"integrity": "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==",
|
| 2273 |
+
"license": "MIT",
|
| 2274 |
+
"funding": {
|
| 2275 |
+
"type": "github",
|
| 2276 |
+
"url": "https://github.com/sponsors/wooorm"
|
| 2277 |
+
}
|
| 2278 |
+
},
|
| 2279 |
"node_modules/inline-style-parser": {
|
| 2280 |
"version": "0.2.7",
|
| 2281 |
"resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.7.tgz",
|
|
|
|
| 3799 |
"url": "https://opencollective.com/unified"
|
| 3800 |
}
|
| 3801 |
},
|
| 3802 |
+
"node_modules/rehype-raw": {
|
| 3803 |
+
"version": "7.0.0",
|
| 3804 |
+
"resolved": "https://registry.npmjs.org/rehype-raw/-/rehype-raw-7.0.0.tgz",
|
| 3805 |
+
"integrity": "sha512-/aE8hCfKlQeA8LmyeyQvQF3eBiLRGNlfBJEvWH7ivp9sBqs7TNqBL5X3v157rM4IFETqDnIOO+z5M/biZbo9Ww==",
|
| 3806 |
+
"license": "MIT",
|
| 3807 |
+
"dependencies": {
|
| 3808 |
+
"@types/hast": "^3.0.0",
|
| 3809 |
+
"hast-util-raw": "^9.0.0",
|
| 3810 |
+
"vfile": "^6.0.0"
|
| 3811 |
+
},
|
| 3812 |
+
"funding": {
|
| 3813 |
+
"type": "opencollective",
|
| 3814 |
+
"url": "https://opencollective.com/unified"
|
| 3815 |
+
}
|
| 3816 |
+
},
|
| 3817 |
"node_modules/remark-gfm": {
|
| 3818 |
"version": "4.0.1",
|
| 3819 |
"resolved": "https://registry.npmjs.org/remark-gfm/-/remark-gfm-4.0.1.tgz",
|
web/package.json
CHANGED
|
@@ -16,6 +16,7 @@
|
|
| 16 |
"react-markdown": "^9.0.1",
|
| 17 |
"react-syntax-highlighter": "^15.5.0",
|
| 18 |
"rehype-katex": "^7.0.0",
|
|
|
|
| 19 |
"remark-gfm": "^4.0.1",
|
| 20 |
"remark-math": "^6.0.0"
|
| 21 |
},
|
|
|
|
| 16 |
"react-markdown": "^9.0.1",
|
| 17 |
"react-syntax-highlighter": "^15.5.0",
|
| 18 |
"rehype-katex": "^7.0.0",
|
| 19 |
+
"rehype-raw": "^7.0.0",
|
| 20 |
"remark-gfm": "^4.0.1",
|
| 21 |
"remark-math": "^6.0.0"
|
| 22 |
},
|
web/src/App.tsx
CHANGED
|
@@ -4,6 +4,7 @@ import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
|
|
| 4 |
import remarkMath from 'remark-math';
|
| 5 |
import remarkGfm from 'remark-gfm';
|
| 6 |
import rehypeKatex from 'rehype-katex';
|
|
|
|
| 7 |
import 'katex/dist/katex.min.css';
|
| 8 |
import katex from 'katex';
|
| 9 |
import Login from './Login';
|
|
@@ -525,6 +526,7 @@ const SegmentedMarkdown = React.memo(function SegmentedMarkdown({ content }: { c
|
|
| 525 |
<ReactMarkdown
|
| 526 |
key={`m-${i}`}
|
| 527 |
remarkPlugins={[remarkGfm]}
|
|
|
|
| 528 |
urlTransform={allowDataImageUrl}
|
| 529 |
components={mdOnlyComponents}
|
| 530 |
>
|
|
@@ -664,7 +666,7 @@ const MessageItem = React.memo(function MessageItem({
|
|
| 664 |
) : (
|
| 665 |
<ReactMarkdown
|
| 666 |
remarkPlugins={[[remarkMath, { singleDollarTextMath: true }], remarkGfm]}
|
| 667 |
-
rehypePlugins={[[rehypeKatex, { throwOnError: false, strict: false }]]}
|
| 668 |
urlTransform={allowDataImageUrl}
|
| 669 |
components={{
|
| 670 |
code({ className, children, ...props }: any) {
|
|
@@ -750,7 +752,7 @@ const MessageItem = React.memo(function MessageItem({
|
|
| 750 |
<div className="tool-output">
|
| 751 |
<ReactMarkdown
|
| 752 |
remarkPlugins={[[remarkMath, { singleDollarTextMath: true }], remarkGfm]}
|
| 753 |
-
rehypePlugins={[[rehypeKatex, { throwOnError: false, strict: false }]]}
|
| 754 |
urlTransform={allowDataImageUrl}
|
| 755 |
components={{
|
| 756 |
code({ className, children, ...props }: any) {
|
|
|
|
| 4 |
import remarkMath from 'remark-math';
|
| 5 |
import remarkGfm from 'remark-gfm';
|
| 6 |
import rehypeKatex from 'rehype-katex';
|
| 7 |
+
import rehypeRaw from 'rehype-raw';
|
| 8 |
import 'katex/dist/katex.min.css';
|
| 9 |
import katex from 'katex';
|
| 10 |
import Login from './Login';
|
|
|
|
| 526 |
<ReactMarkdown
|
| 527 |
key={`m-${i}`}
|
| 528 |
remarkPlugins={[remarkGfm]}
|
| 529 |
+
rehypePlugins={[rehypeRaw]}
|
| 530 |
urlTransform={allowDataImageUrl}
|
| 531 |
components={mdOnlyComponents}
|
| 532 |
>
|
|
|
|
| 666 |
) : (
|
| 667 |
<ReactMarkdown
|
| 668 |
remarkPlugins={[[remarkMath, { singleDollarTextMath: true }], remarkGfm]}
|
| 669 |
+
rehypePlugins={[rehypeRaw, [rehypeKatex, { throwOnError: false, strict: false }]]}
|
| 670 |
urlTransform={allowDataImageUrl}
|
| 671 |
components={{
|
| 672 |
code({ className, children, ...props }: any) {
|
|
|
|
| 752 |
<div className="tool-output">
|
| 753 |
<ReactMarkdown
|
| 754 |
remarkPlugins={[[remarkMath, { singleDollarTextMath: true }], remarkGfm]}
|
| 755 |
+
rehypePlugins={[rehypeRaw, [rehypeKatex, { throwOnError: false, strict: false }]]}
|
| 756 |
urlTransform={allowDataImageUrl}
|
| 757 |
components={{
|
| 758 |
code({ className, children, ...props }: any) {
|
web/vite.config.ts
CHANGED
|
@@ -23,6 +23,7 @@ export default defineConfig({
|
|
| 23 |
'remark-math',
|
| 24 |
'remark-gfm',
|
| 25 |
'rehype-katex',
|
|
|
|
| 26 |
],
|
| 27 |
'syntax-vendor': ['react-syntax-highlighter'],
|
| 28 |
'katex-vendor': ['katex'],
|
|
|
|
| 23 |
'remark-math',
|
| 24 |
'remark-gfm',
|
| 25 |
'rehype-katex',
|
| 26 |
+
'rehype-raw',
|
| 27 |
],
|
| 28 |
'syntax-vendor': ['react-syntax-highlighter'],
|
| 29 |
'katex-vendor': ['katex'],
|