Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsedown not counting linebreaks properly? Images also wrapped in <p> tags. #830

Open
scottynorris opened this issue Apr 27, 2022 · 0 comments

Comments

@scottynorris
Copy link

My current usage:

$markdown = file_get_contents($filepath); 
new Parsedown(); ?>

echo Parsedown::instance()
   ->setBreaksEnabled(true) # enables automatic line breaks
   ->text($markdown);

My file:

Blah blah blah
Blah.
![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 1")

This outputs:

<p>Blah blah blah</p>
<p>Blah.</p>
<p><img src="https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png" alt="alt text" title="Logo Title Text 1" /></p>

How comes it's not counting the line breaks and why is it added p tags to the image?

Many thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant