beeminder / blog

3 stars 2 forks source link

Using "#9" as hovertext on a link breaks markdown rendering #405

Open dreeves opened 1 year ago

dreeves commented 1 year ago
### Desiderata
- [x] Rule out weird spacing in the markdown
- [x] Check if it's the unusual title text (`"#9"`) in the markdown IT TOTALLY IS
- [x] Replicata
- [x] Work around it in /forget by changing the hovertext
- [ ] Diagnose the problem
- [ ] Decide whether to fix or apply workarounds
- [ ] If workaround, search for other instances to work around

I noticed an ugly bug at https://blog.beeminder.com/forget with rendering a hyperlink (see "concept handle"):

image

Could the space at the end of the line with the URL be the problem? The unusual title text (just "#9")?

image

Replicata

  1. Go to the source doc of some post and make hyperlink like so:
[This is the anchor text](
  http://example.com
  "#9"
) and this is more text after the link.

Expectata

For that to be a normal hyperlink like always.

Resultata

It tried to show the raw markdown instead of turning it into "<a href" etc

Cognata

Verbata: zombie, broken markdown,

narthur commented 8 months ago

Sorry this is late, but we fixed this a couple of months ago by modifying the markdown to this:

It's a 
[concept handle](
  https://slatestarcodex.com/2016/02/20/writing-advice/
  "See item 9"
) for a 
dreeves commented 8 months ago

Thanks! It would be nice if this could fail loudly. Not sure if that's worth the trouble, but I guess it'd be nice to at least know why a title attribute with contents #9 breaks things in the first place.