jmacdotorg / plerd

Ultralight Dropbox-friendly Markdown-based blogging.
MIT License
112 stars 21 forks source link

The "description" method fails with posts leading with images #35

Closed jmacdotorg closed 5 years ago

jmacdotorg commented 5 years ago

If a post's source file leads with an image (or any other HTML tag) followed by two carriage returns, the Post class's description object method will understand that as the post's first "paragraph". Thus, if such a post defines no overt "description" attribute in its metadata, then the return value of its description method will be the empty string: it'll fetch that "paragraph", snip out all its HTML tags, and be left with nothing. And that's terrible.