mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-03 05:29:12 +00:00
Clean duplicate title shown in reference snippets of hierarchical docs
Hierarchical documents like org-mode, markdown have their ancestry shown in first line. Remove it to show cleaner, deduplicated reference text from org-mode, markdown files
This commit is contained in:
@@ -252,15 +252,11 @@ export default function ChatMessage(props: ChatMessageProps) {
|
||||
|
||||
useEffect(() => {
|
||||
const observer = new MutationObserver((mutationsList, observer) => {
|
||||
console.log("called mutation observer");
|
||||
// If the addedNodes property has one or more nodes
|
||||
if (messageRef.current) {
|
||||
for (let mutation of mutationsList) {
|
||||
if (mutation.type === "childList" && mutation.addedNodes.length > 0) {
|
||||
// Call your function here
|
||||
|
||||
console.log("render katex in body");
|
||||
|
||||
renderMathInElement(messageRef.current, {
|
||||
delimiters: [
|
||||
{ left: "$$", right: "$$", display: true },
|
||||
|
||||
Reference in New Issue
Block a user