Comments (2)
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.
https://github.com/zeon-studio/astroplate/blob/main/src/lib/utils/textConverter.ts#L35
from npm-astro-post-excerpt.
@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. :)
from npm-astro-post-excerpt.
Related Issues (20)
- Make the testing site public
- Implement @igor.dvlpr/strip-headings
- Broken Astro integrations link
- Update author email
- Support for HTML rendering HOT 1
- Add support for hybrid rendering HOT 1
- Ellipsis in detected symbols HOT 1
- Switch to astro v2 HOT 10
- Switch to TypeScript HOT 1
- Strip HTML headings HOT 1
- Broken Intellisense
- Improve testing
- [DEV]: Upgrade astro to v2.2.0 (test site)
- [DEV]: Upgrade astro to v2.2.0
- Peer dependency install error
- Boolean prop not valid - aborting. Error HOT 8
- [DEP]: Upgrade prettier to v3.0.0
- [DEP]: Upgrade astro to v2.8.2
- [DEP]: Upgrade astro to v2.8.2 (test site)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from npm-astro-post-excerpt.