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 elements don't parse across newlines #30

Closed
duckwork opened this issue Mar 24, 2018 · 3 comments
Closed

Inline elements don't parse across newlines #30

duckwork opened this issue Mar 24, 2018 · 3 comments
Assignees

Comments

@duckwork
Copy link

When parsing Markdown, mistletoe doesn't parse inlines across line boundaries. Example source:

here is a file with *emph* and also
it will have *emph across
lines.*  uh-oh. Let's try **strong** and
also, of course, **strong across
lines.** uh-oh-uh-oh.

And example output:

<p>here is a file with <em>emph</em> and also
it will have *emph across
lines.*  uh-oh. Let&#x27;s try <strong>strong</strong> and
also, of course, **strong across
lines.** uh-oh-uh-oh.
</p>

Most parsers recognize inlines over newlines. It'd be nice if mistletoe did, too. Would it be as simple as setting a re flag?

@miyuchina
Copy link
Owner

miyuchina commented Mar 24, 2018

Yeah, I added re.DOTALL flags across all the builtin token types. Some regexes also need to be changed, and there might be some performance implications, but CommonMark does it, so I'm keeping this feature.

Let me know if there's anything weird; I'll do a minor version release to pypi later. Thank you!

@duckwork
Copy link
Author

Cool, thanks! I'm looking forward to the pypi release.

@miyuchina
Copy link
Owner

Just released it! Should be working in 0.5.4.

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

2 participants