You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, thanks for a must needed Astro integration.
I came across an issue in both .mdx and .md files.
The text I get back still has markdown formatting applied to it, at least where italics (*text* or _text_) and bold (**text**) text are concerned. I tried all 3 options for PropRenderer, and they all yielded the same result.
Lorem ipsum dolor **sit amet**, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ![fpo](../../assets/uploads/blog-placeholder-1.jpg) Adipiscing enim…
The text was updated successfully, but these errors were encountered:
djmtype
changed the title
Markdown syntax still being included
Markdown syntax still being rendered
Jan 26, 2024
BTW, in regards to choosing the plain text render, it would probably be ideal to remove images too.
BTW, it might be worth checking out how Astroplate handles the markdown body in order to return plain text. It uses the help of marked to parse the content, among other rules.
@djmtype, thanks for taking your time to create the issue and providing a possible fix for it.
Indeed, everything except headings is left intact because the component's behavior is inspired by a very common Markdown authoring style, i.e.:
### Some heading
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam id elementum nunc. Morbi pharetra, sem interdum suscipit tristique, tellus mi sodales erat, id consectetur sem odio eget eros.
Aenean non laoreet quam, eget semper nisl. Suspendisse potenti. Aenean in convallis odio, id mollis neque. Vestibulum dictum, massa fringilla consectetur posuere, risus mi bibendum metus, id elementum massa libero in dolor. Phasellus mattis, nunc eu sollicitudin hendrerit, nisl eros bibendum enim, sed ultrices risus lacus vitae diam.
Nam sapien mauris, pretium nec eros et, mattis fermentum est.
### Some other heading
Etc.
Which in turn means anything else well stay as-is. Also *.mdx are quite more complex and difficult to strip of Markdown/JS code.
Either way, I can see the feature to strip all formatting as well being useful/needed and will be something I'll implement in the near future, quite possibly in the next release.
If you have any additional issues/comments feel free to post them. :)
First, thanks for a must needed Astro integration.
I came across an issue in both
.mdx
and.md
files.The text I get back still has markdown formatting applied to it, at least where italics (
*text*
or_text_
) and bold (**text**
) text are concerned. I tried all 3 options forPropRenderer
, and they all yielded the same result.Using Astro 4.2.4.
Example return:
Lorem ipsum dolor **sit amet**, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ![fpo](../../assets/uploads/blog-placeholder-1.jpg) Adipiscing enim…
The text was updated successfully, but these errors were encountered: