meddle0x53 / blogit

OTP application for generating blog posts from a Git repository containing markdown files.
MIT License
42 stars 7 forks source link

Markdown should be parsed entirely for preview #1

Closed burgerdev closed 6 years ago

burgerdev commented 6 years ago

Hi Meddle,

first of all, thanks for blogit - after I discovered it I just knew it was the right tool for me! To the problem at hand:

Consider the following markdown:

# Title

[Lorem ipsum][1] dolor sit amet, 
consectetuer adipiscing elit.

[1]: https://loremipsumgenerator.com/

If I set max_lines_in_preview to 3, I would still expect the link to be resolved. Since the pipeline generating preview does split first and parse markdown only of head, the link at the bottom is lost and the html generated is just

<!-- css and other distractions omitted -->
<h2>Title</h2>
<p>[Lorem ipsum][1] dolor sit amet, </p>
<a><h4>[...]</h4></a>
<hr class="post-divider" />

instead of

<!-- css and other distractions omitted -->
<h2>Title</h2>
<p><a href="https://loremipsumgenerator.com/">Lorem ipsum</a>dolor sit amet, </p>
<a><h4>[...]</h4></a>
<hr class="post-divider" />

Cheers, Markus

meddle0x53 commented 6 years ago

To be honest I've never used reference links in markdown. And that's a miss! Of course we should support them in the preview, nice find and nicely described issue. Will try to resolve it as soon as possible.

meddle0x53 commented 6 years ago

It now has a PR. I'll be merging it and releasing 1.1.1 tomorrow, test it if you want before that.