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

Inline markup to block in extension #348

Closed
lazlo-bonin opened this issue Sep 2, 2015 · 2 comments
Closed

Inline markup to block in extension #348

lazlo-bonin opened this issue Sep 2, 2015 · 2 comments

Comments

@lazlo-bonin
Copy link

I'm trying to make some inline markup become a block (I believe that's the right terminology) for pull quotes.

For example, my input:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam pellentesque rhoncus odio, accumsan bibendum nunc interdum quis. $$ Fusce quis ullamcorper diam, sit amet luctus libero. $$ Maecenas in felis sagittis, rhoncus nunc ut, molestie tortor. Vivamus mollis libero non facilisis mollis.

Pellentesque condimentum pellentesque mi ac venenatis. Nullam ornare a nisi eu molestie. Vivamus eleifend, risus sed consectetur ultricies, orci elit iaculis mauris, pulvinar pellentesque elit eros ullamcorper neque. Aliquam erat volutpat.

(Notice the $$s in the first paragraph)

And the desired HTML output:

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam pellentesque rhoncus odio, accumsan bibendum nunc interdum quis. Fusce quis ullamcorper diam, sit amet luctus libero. Maecenas in felis sagittis, rhoncus nunc ut, molestie tortor. Vivamus mollis libero non facilisis mollis. </p>

<div class="pullquote">Fusce quis ullamcorper diam, sit amet luctus libero.</div>

<p>Pellentesque condimentum pellentesque mi ac venenatis. Nullam ornare a nisi eu molestie. Vivamus eleifend, risus sed consectetur ultricies, orci elit iaculis mauris, pulvinar pellentesque elit eros ullamcorper neque. Aliquam erat volutpat.</p>

Basically, I want to detect an inline element and append its content in a block.

Is this possible? If so, how?

@erusev
Copy link
Owner

erusev commented Sep 2, 2015

this seems like it'd be hard to implement

parsedown is built around the fact that in markdown, block-level elements can be identified based on the first characters of their lines

the element that you describe is not consistent with this fact

@aidantwoods
Copy link
Collaborator

I'm not sure I see why this needs to be a block? I think you can achieve the output you're looking for with just an inline.

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

No branches or pull requests

3 participants