-
Notifications
You must be signed in to change notification settings - Fork 59
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
Formating ais-highlight attribute with markdown content #597
Comments
Hey @adhamfarrag |
Hey @bidoubiwa Thanks for checking this out.
It's and index for articles and this is a single article. Is this is what you're asking for ? |
Yes thanks you :) Could you also provide your whole instant-search component? |
Here you are :)
|
Hi @bidoubiwa! I tried using const marked = require('marked').marked
const PlainTextRenderer = require('marked-plaintext')
const renderer = new PlainTextRenderer()
function convertToPlainText(content) {
return marked(content, { renderer: renderer })
}
export { convertToPlainText } |
Hey @adhamfarrag I will be looking into your bug as soon as I have time. We are very busy for the moment. I'll get back to you asap |
Description
Using Strapi, strapi-meilisearch-plugin and instant-meilisearch here.
Trying to render results from a search bar, typical article model (title, body, etc). And as strapi uses markdown, results come back with markdown syntanx. Tried to modify
ais-highlight
to render article body using markdown-it.Is there anyway around my problem ?
Expected behavior
I expected it to allow me to render readable markdown content.
Current behavior
I get
Input data should be a String
error.Screenshots or Logs
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: