diff --git a/examples/server/public/index.html b/examples/server/public/index.html index 2961999f2..095c4a929 100644 --- a/examples/server/public/index.html +++ b/examples/server/public/index.html @@ -877,19 +877,30 @@ // poor mans markdown replacement const Markdownish = (params) => { - const md = params.text - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/(^|\n)#{1,6} ([^\n]*)(?=([^`]*`[^`]*`)*[^`]*$)/g, '$1
$1
')
- .replace(/`(.*?)`/g, '$1
')
- .replace(/\n/gim, '$1
')
+ .replace(/`(.*?)`/g, '$1
')
+ .replace(/\n/gim, '${chunks[i]}
`;
+ }
+ }
+
+ const restoredText = chunks.join('');
+
+ return html``;
};
const ModelGenerationInfo = (params) => {
@@ -903,6 +914,7 @@
`
}
+
// simple popover impl
const Popover = (props) => {
const isOpen = useSignal(false);
@@ -1054,4 +1066,3 @@