pharo-project / pharo

Pharo is a dynamic reflective pure object-oriented language supporting live programming inspired by Smalltalk.
http://pharo.org
Other
1.21k stars 355 forks source link

Microdown presenter show parts of the URL for some images when having an _ in URL #17023

Open astares opened 2 months ago

astares commented 2 months ago

If you use Microdown in comments it is possible also to reference images:

This should display a docker image from wikipedia:

![Docker](https://upload.wikimedia.org/wikipedia/commons/7/79/Docker_%28container_engine%29_logo.png)

but for this particular URL Pharo shows unfortunately also a part of the URL additionally to the picture:

Screenshot from 2024-08-22 17-33-25

astares commented 2 months ago

I think the reason is that the URL contains an "underline" which is for Pharo also a separator similar to a space. As you see the URL is sliced/splitted directly after the "underline".

Maybe the Microdown parser has a bug and there is a check for separators (instead of a space) to find the end of the URL. As according to the syntax description one could also write use:

![Pharologo](https://files.pharo.org/media/logo/logo.png size=80&anchor=figLogo.)
Ducasse commented 2 months ago

In recent Microdown we can now write

![Pharologo. % size=80&anchor=figLogo](https://files.pharo.org/media/logo/logo.png)
Ducasse commented 2 months ago

This way it does not break the file rendering on VScode or Github.

Ducasse commented 2 months ago

The problem with the underline in file filename is fixed in recent version.

astares commented 2 months ago

@Ducasse Great - thanks! We close the issue once it is part of standard image.