Closed mattwidmann closed 10 years ago
at this point, i think we should assume the input is already .html
files so we don't have to marked()
them twice. people can just put the excerpt step after the conversion step, and ill do a major bump on this lib since it's a breaking change
Yeah, I didn't feel it made much sense to run marked()
twice, but couldn't think of a way to fix this issue while maintaining the same order of evaluation.
Alright, I made that change. Might want to make sure the tests look right and do a sanity check.
nice! added in 1.0.0
thanks a bunch for the nice PR
This fixes issue #5.
Instead of finding the first paragraph from the Markdown source, convert it to HTML and then find the first
<p>
tag using cheerio. Two new tests are also included to ensure reference-style links are converted to anchor tags correctly and to ensure that the excerpt is the first Markdown paragraph, not a code block.Also, whitespace is now trimmed from excerpts before adding them to a file.