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

Newlines inside anchors does not work #158

Open
cjohansen opened this issue Dec 11, 2019 · 5 comments
Open

Newlines inside anchors does not work #158

cjohansen opened this issue Dec 11, 2019 · 5 comments

Comments

@cjohansen
Copy link

If you have a newline in the link text of a markdown link, the parser spits it out verbatim:

[Here is a long
link text](/page)

This is rendered as is in HTML.

@yogthos
Copy link
Owner

yogthos commented Dec 11, 2019

that's actually documented limitation at the moment https://github.com/yogthos/markdown-clj#limitations

@cjohansen
Copy link
Author

I see. Would you be interested in a PR to fix it? It seems to me that parsing paragraph by paragraph would solve both this and my other issue?

@yogthos
Copy link
Owner

yogthos commented Dec 12, 2019

Sure, a PR would be most welcome.

@cjohansen
Copy link
Author

Ok, I'll see what I find the time for :) I have lots of markdown files, and fixing the issue would probably be easier than looking over the files... But I don't know anything about the implementation, so maybe I'm wrong :)

@yogthos
Copy link
Owner

yogthos commented Dec 16, 2019

It shouldn't be too bad to fix in theory. You'd basically just want to preprocess the input to read contiguous chunks instead of single lines. Also, you might want to take a look at using flexmark instead. Here's an example calling it from Clojure.

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

2 participants