diff --git a/src/components/EntryBody.tsx b/src/components/EntryBody.tsx
index d4ec541..441e117 100644
--- a/src/components/EntryBody.tsx
+++ b/src/components/EntryBody.tsx
@@ -7,115 +7,110 @@ import "katex/dist/katex.min.css"
import BodyLink from "./BodyLink"
import EntryLoadingSkeleton from "./EntryLoadingSkeleton"
import { useSearchParams } from "react-router"
-
+import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "./ui/table"
const ImagePreprocessor = (src) => {
- const filename = src.src.split("/").pop()
- const s3RootUrl = "https://eolas.s3.systemsobscure.net/"
- return
+ const filename = src.src.split("/").pop()
+ const s3RootUrl = "https://eolas.s3.systemsobscure.net/"
+ return
}
const escapeRegex = (str) => str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")
const highlighter = (children, highlight) => {
- if (!highlight || typeof children !== "string") return children
- const words = highlight.trim().split(/\s+/)
- const pattern = words.length > 1 ? escapeRegex(highlight) : escapeRegex(words[0])
- const regex = new RegExp(`\\b(${pattern})\\b`, "gi")
- const parts = children.split(regex)
+ if (!highlight || typeof children !== "string") return children
+ const words = highlight.trim().split(/\s+/)
+ const pattern = words.length > 1 ? escapeRegex(highlight) : escapeRegex(words[0])
+ const regex = new RegExp(`\\b(${pattern})\\b`, "gi")
+ const parts = children.split(regex)
- return parts.map((part, i) =>
- regex.test(part) ? (
-
- {part}
-
- ) : (
- part
- ),
- )
+ return parts.map((part, i) =>
+ regex.test(part) ? (
+
+ {part}
+
+ ) : (
+ part
+ ),
+ )
}
export default function EntryBody({ body, isLoading }) {
- const [searchParams] = useSearchParams()
+ const [searchParams] = useSearchParams()
- const highlight = searchParams.get("highlight")
+ const highlight = searchParams.get("highlight")
- if (isLoading) {
- return
- {highlighter(children, highlight)} -
- ), - ul: ({ children }) =>- {highlighter(children, highlight)} -- ), - pre: ({ children }) => { - const child = children.props - return
- {children}
-
- ),
- img: ({ src }) => + {highlighter(children, highlight)} +
+ ), + ul: ({ children }) =>+ {highlighter(children, highlight)} ++ ), + pre: ({ children }) => { + const child = children.props + return
+ {children}
+
+ ),
+ img: ({ src }) =>