Despite the automatically hyperlinkified URI having enough space around it (one line) to be a block element, it doesn’t oneboxify, since:
1. Text
https://example.com
Text
…becomes:
-
Text
Text
Despite the automatically hyperlinkified URI having enough space around it (one line) to be a block element, it doesn’t oneboxify, since:
1. Text
https://example.com
Text
…becomes:
Text
Text
Try rebuilding the HTML of the post once — that often fixes issues where links don’t onebox properly:
I think the spaces in front of it would make it an inline onebox and not a full one. I’m not sure I know a workaround.
Did that work for you?
@JammyDodger, that’s what I see at every instance I’ve tried thus far (about 8, in total).
@janan_gagan, I don’t possess TL4 permission anywhere… If any of you are able to rebuild the HTML5 content of my post at /1
, that would confirm whether it works. However, per the aforementioned, I’m doubtful.
In the meantime, I’ve converted this to a Feature post, since it appears to currently be impossible.
Thanks, regardless.
Yes, there’s a specific logic in our markdown-it tokens that forces links to be considered inline oneboxes in cases that are not top level links (ie. not inside any list/blockquote/etc)
@renato, they can still oneboxify inside <details>
, though. Seems especially strange to permit that, but not any other block element. What’s the rationale?
There’s no explicit rationale, it’s just that raw HTML is seen by markdown-it in a flat way, it doesn’t try to infer the nesting from tags being opened/closed.
Raw Html node
Top level onebox
Raw Html node
@renato, seems to me that, insofar as the CSS defines the element that encapsulates a URI as a block element, oneboxification should occur; I can’t think of any problematic edge cases.