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

When a linebreak occurs in a link, the link is not parsed. #97

Open
vermiculus opened this issue Apr 28, 2016 · 5 comments
Open

When a linebreak occurs in a link, the link is not parsed. #97

vermiculus opened this issue Apr 28, 2016 · 5 comments

Comments

@vermiculus
Copy link

[really long pieces of text spanning
two lines](link)

should work.

(assert
 (= (md-to-html-string "[long\nline](link)")
    (md-to-html-string "[long  line](link)")))
@yogthos
Copy link
Owner

yogthos commented Apr 28, 2016

Unfortunately, thats a known limitation. The parser currently tokenizes each line individually, so tags spanning multiple lines are not supported.

@vermiculus
Copy link
Author

Is this something that's reasonable to be worked-around? It's conceivable that a preprocessor could ensure tags are on one line when appropriate (i.e., when not ending with a double-space) before it's passed to the tokenizer.

@yogthos
Copy link
Owner

yogthos commented Apr 28, 2016

That would be possible, but would also incur a runtime overhead. I would be ok with that as an opt in, the way it's done with the reference style links.

@ir-regular
Copy link

I would also be interested in links with linebreaks because of http://www.gravizo.com/ :)

Would requiring a "line continuation" indicator (like a backslash in bash) make it easier to handle? You could check the last character, read in all lines that have a continuation indicator + 1 more line, concatenate and put through normal link handling.

@yogthos
Copy link
Owner

yogthos commented Apr 27, 2018

Yeah, you'd have to implement something like that. The tricky part is handling that intelligently within lists, especially when you use paragraphs for list items, and nested lists.

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