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

Multiline base64 images support #429

Closed
alkorgun opened this issue Aug 31, 2017 · 3 comments
Closed

Multiline base64 images support #429

alkorgun opened this issue Aug 31, 2017 · 3 comments
Assignees

Comments

@alkorgun
Copy link

Hi,

I have some pictures like this:

![](data:image/png;base64,iVBORw0KGgoAAAANSUh...)

When picture is one-line, showdown works great, but if picture contains line breaks, showdown can't handle that.

Is this a bug or I just missed some option/flag to enable?

P.S. for example marked.js can handle line breaks in images with no problem.

@tivie tivie self-assigned this Sep 6, 2017
@tivie
Copy link
Member

tivie commented Sep 6, 2017

@alkorgun
Copy link
Author

alkorgun commented Sep 7, 2017

@tivie if you were more attentive you would see versions: marked 0.2.6 is 5 years old. And so, what is your conclusion? Most of parsers fail, showdown should fail too?

@tivie
Copy link
Member

tivie commented Sep 8, 2017

@alkorgun As stated in the original spec links and images urls cannot be wrapped (that is, cannot contain newline characters).

The original spec is silent about this regarding inline link definitions, but explicit in reference style links.

Most Markdown implementations respect the original spec, and do not support linebreaks in urls. Github does not support base64 at all. (either inline or reference)
The ones that do, however, are inconsistent.

For instance, marked does support linebreaks in inline link definitions, but does not support them in reference style
(see fiddle)


Showdown can implement a special case for base64 encoded images, so that line wrapping is supported.
See the updated wiki for more information.

@tivie tivie closed this as completed in 8c593a4 Sep 8, 2017
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