-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
img wrapped in p #180
Comments
..okay? suggesting to use from
to
|
So use line() everywhere. |
What do you mean everywhere, like parsing the text myself into lines and then applying parsedown on each one of those lines. Seriously? |
Oh, now I understand what you mean, sorry. It's not possible at the moment and frankly I don't see the need for it. You can parse all of your markup with text() and images with line() or you can use plain HTML inside your markdown. |
Well I do, there's nothing unsemantic about Also what you are suggesting would again mean parsing the text myself, find all the pre-image and post-image parts, apply There obviously are elements(block ones) that are not getting wrapped with paragraphs, which means there should be a way to get image to parse the same way.. |
@fxck you have a valid use case, but parsedown is just working according to the spec here. I don't think that you can get this change into core. You have two options though:
|
I'm absolutely fine with someone who's familiar with the code just pointing me in the right direction(as of what to change), I tried changing stuff around myself, but without much of a success. As for postproccessing, I could probably use this but I'd be happier if I could do it with parsedown directly.. |
You should override (or change) the |
@fxck @erusev simple example code: |
@apfelbox Nice! |
@apfelbox looks good, thanks for saving me some time! |
@erusev has anything changed in recent versions of parsedown? because what @apfelbox posted doesn't really work anymore( also parsedown is wrapping custom elements, be it angular directives or web components in |
when either |
|
Right. It'd be great if you could update the gist. |
Can't really, it's @apfelbox's here a new one though. |
Great, thanks. |
(I updated my gist to reflect the latest changes) |
Updated the gist to work with 1.7.1 and wrap images in |
is there a way of disabling wrapping of certain elements(like images) with paragraph?
![](image.jpg)
ends up as
<p><img src="image.jpg" /></p>
I'd like it to be just
<img src="image.jpg" />
I tried changing few things around in the code, but without much of a success..
The text was updated successfully, but these errors were encountered: