-
Notifications
You must be signed in to change notification settings - Fork 3
feat(md): add md util for truncating around <macro_em> search tags for soup #768
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(md): add md util for truncating around <macro_em> search tags for soup #768
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pulled locally and a lot of these results still aren't working well imo. This is the content of the first one btw where it only grabbed the date:
" 29, 2025
<macro_em>Hey</macro_em> — quick reminder.
If you want to start 2026 with a"
Lmk if you need more examples to play around with.
also we have packages/core/util/searchHighlight.ts already I'd move the utils into there if possible
EDIT: saw that we didn't have a truncate search match markdown util on the email content match, lemme try that
gbirman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok so here's the requested changes summary:
- leave props.data.content as is in entitywitheverything and instead update packages/macro-entity/src/queries/search.ts
getSearchDatafunction to have:
content: YOUR_UTIL_FN(mergeAdjacentMacroEmTags(content)),
-
remove LexicalMarkdown/searchUtils and move the utils into packages/core/util/searchHighlight.ts
-
fix the ## bug I mentioned

Summary
Screenshots, GIFs, and Videos