beeminder / blog

3 stars 2 forks source link

Markdown-style image hotlinks no longer work #339

Open dreeves opened 1 year ago

dreeves commented 1 year ago
### Desiderata
- [x] Manually do the workaround for all existing instances
- [x] Demote this as a regression
- [x] Narthur tries replicata
- [ ] Decide if we want to support them going forward

Replicata

  1. Go to https://blog.beeminder.com/commitwall
  2. Look at the screenshot in the Announcement section

Expectata

To see a screenshot.

Resultata

This mess:

image

Nota Nebulosa

I changed it to html (<img src="http..."/>) instead of the markdown (![image|436x301](http...)) as a workaround. I think it's rare that we used the latter format in posts but need to check.

Verbata: markdown specification of inline images, mendoza, GFM, GitHub-Flavored Markdown,

dreeves commented 1 year ago

Interestingly, I found this version which does work:

![image](https://user-images.githubusercontent.com/1292086/70180858-df72e600-16f1-11ea-8876-585b547e3e6c.png)
dreeves commented 1 year ago

I've now done the workaround for existing images. I think it would be nice to support this, since GitHub and expost both do. Eg http://doc.bmndr.co/shapeup. Unclear if it counts as a regression now since we've successfully worked around it!

narthur commented 1 year ago

@dreeves is the issue the image size specifically? e.g. |200x300?

dreeves commented 1 year ago

Seems like it! To clarify, both GitHub and Expost (the doc.bmndr.co URLs) support things like ![image|690x254](http://example.com/foo.png) but the blog doesn't.

narthur commented 1 year ago

Interesting. Marked is supposed to support GitHub-flavored markdown. I just checked the GFM spec and it doesn't seem to say anything about this feature. 🤔

https://github.github.com/gfm/#images

narthur commented 1 year ago

Testing:

![alt|50x50](https://blog.beeminder.com/wp-content/uploads/2023/05/mathboardwithbee.png)

alt|50x50

narthur commented 1 year ago

@dreeves It appears that GFM doesn't break, but it also doesn't respect the size. It just treats it like part of the alt text. So I'm surprised that the cases you found did seem to break.