# Improved rendering of post previews in feed
FEEDweave supports posting arbitrary Markdown. This means posts can be as long or as short as users want, and can support arbitrary markdown syntax, such as links, images, styling, etc.
To preserve space in the feed, FEEDweave displays a truncated preview of a post.
Initially, this was implemented in the most naive way: by truncating the raw markdown text before parsing it into React. This usually worked, but sometimes resulted in corrupting markdown by truncating links or images halfway through.
Here truncating the text breaks the embedded image in the preview:
![](https://i.imgur.com/ZQnpw1Z.png)
In the latest build of FEEDweave, I fixed this by modifying Abstract Syntax Tree of the post and editing nodes directly there. An AST is basically a structured representation of the nodes of a document. ASTs make documents easy to traverse, edit, and transform programatically. You can learn more about ASTs [here](https://css-tricks.com/how-to-modify-nodes-in-an-abstract-syntax-tree/) and in the [UnifiedJS](https://unifiedjs.com/) project.
With the latest update, truncation distinguishes between text nodes and presentation nodes, and only truncates the base text. This preserves higher order node types like links and images without breaking the markup, while still allowing us to shorten text for a nice preview.
Here is how a preview look now:
![](https://i.imgur.com/0E81SUI.png)
Much better!