# How does one add a onebox inside a list?

**URL:** https://meta.discourse.org/t/how-does-one-add-a-onebox-inside-a-list/373743
**Category:** Feature
**Tags:** onebox
**Created:** [July 10, 2025, 1:07pm UTC](https://meta.discourse.org/t/how-does-one-add-a-onebox-inside-a-list/373743 "2025-07-10T13:07:31Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![roke\_julian\_lockhart](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roke_julian_lockhart/32/540179_2.png) [@roke\_julian\_lockhart](https://meta.discourse.org/u/roke_julian_lockhart)
#### Post date: [July 10, 2025, 1:07pm UTC](https://meta.discourse.org/t/how-does-one-add-a-onebox-inside-a-list/373743/1 "2025-07-10T13:07:31Z")

</div>

Despite the automatically hyperlinkified URI having enough space around it (one line) to be a block element, it doesn’t oneboxify, since:

```Markdown
1. Text

   https://example.com

   Text

```

…becomes:

* * *

1. Text

* * *

> ****
>
> #### Context
> 
> > **[Pre-compiled Linux Unreal Engine installation](https://forums.unrealengine.com/t/pre-compiled-linux-unreal-engine-installation/609358/14?u=rokejulianlockhart)**
> >
> > @dwarf1977, I’ve asked about this downstream: At discussion.fedoraproject.org/t/158051. \[1\] For openSUSE TW, at forums.opensuse.org/t/186398. \[1:1\] A PPA? If so, when Launchpad transfers to Git, that’ll be more feasible. In effect,...

---

<div class="post-metadata">

### Author: ![jahan\_gagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jahan_gagan/32/501948_2.png) [@jahan\_gagan](https://meta.discourse.org/u/jahan_gagan)
#### Post date: [July 11, 2025, 7:57am UTC](https://meta.discourse.org/t/how-does-one-add-a-onebox-inside-a-list/373743/2 "2025-07-11T07:57:42Z")

</div>

Try rebuilding the HTML of the post once — that often fixes issues where links don’t onebox properly:

> [@Rebuilding HTML on posts or topics](https://meta.discourse.org/t/rebuilding-html-on-posts-or-topics/260993):
>
> bookmark This guide explains how to manually rebuild HTML on posts and topics in Discourse, which can be useful for updating embedded metadata in links. person_raising_hand Required user level: Administrators, Moderators, or Trust Level 4 users Sometimes posts or topics in Discourse contain links with embedded metadata that needs to be updated. This guide will show you how to perform a manual HTML rebuild on posts that require attention. Rebuilding HTML on a post To manually rebuild HT…

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [July 11, 2025, 8:12am UTC](https://meta.discourse.org/t/how-does-one-add-a-onebox-inside-a-list/373743/3 "2025-07-11T08:12:27Z")

</div>

> [@roke\_julian\_lockhart](#):
>
> having enough space around it (one line)

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. 🤔

> [@jahan\_gagan](#):
>
> Try rebuilding the HTML of the post once — that often fixes issues where links don’t onebox properly:

Did that work for you?

---

<div class="post-metadata">

### Author: ![roke\_julian\_lockhart](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roke_julian_lockhart/32/540179_2.png) [@roke\_julian\_lockhart](https://meta.discourse.org/u/roke_julian_lockhart)
#### Post date: [July 11, 2025, 8:58am UTC](https://meta.discourse.org/t/how-does-one-add-a-onebox-inside-a-list/373743/4 "2025-07-11T08:58:03Z")

</div>

> [@JammyDodger](#):
>
> 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. 🤔

@JammyDodger, that’s what I see at every instance I’ve tried thus far (about 8, in total).

> [@JammyDodger](#):
>
> > [@jahan\_gagan](#):
> >
> > Try rebuilding the HTML of the post once — that often fixes issues where links don’t onebox properly:
> 
> Did that work for you?

@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 #Contribute > Feature post, since it appears to currently be impossible.

Thanks, regardless.

---

<div class="post-metadata">

### Author: ![renato](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/renato/32/383632_2.png) [@renato](https://meta.discourse.org/u/renato)
#### Post date: [July 11, 2025, 10:07am UTC](https://meta.discourse.org/t/how-does-one-add-a-onebox-inside-a-list/373743/5 "2025-07-11T10:07:30Z")

</div>

Yes, there’s a [specific logic in our markdown-it tokens](https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse-markdown-it/src/features/onebox.js#L38-L54) that forces links to be considered **inline** oneboxes in cases that are not top level links (ie. not inside any list/blockquote/etc)

---

<div class="post-metadata">

### Author: ![roke\_julian\_lockhart](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roke_julian_lockhart/32/540179_2.png) [@roke\_julian\_lockhart](https://meta.discourse.org/u/roke_julian_lockhart)
#### Post date: [July 11, 2025, 10:48am UTC](https://meta.discourse.org/t/how-does-one-add-a-onebox-inside-a-list/373743/6 "2025-07-11T10:48:24Z")

</div>

@renato, they can still oneboxify inside `<details>`, though. Seems especially strange to permit that, but not any other block element. What’s the rationale?

---

<div class="post-metadata">

### Author: ![renato](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/renato/32/383632_2.png) [@renato](https://meta.discourse.org/u/renato)
#### Post date: [July 11, 2025, 10:53am UTC](https://meta.discourse.org/t/how-does-one-add-a-onebox-inside-a-list/373743/7 "2025-07-11T10:53:22Z")

</div>

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

---

<div class="post-metadata">

### Author: ![roke\_julian\_lockhart](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roke_julian_lockhart/32/540179_2.png) [@roke\_julian\_lockhart](https://meta.discourse.org/u/roke_julian_lockhart)
#### Post date: [July 11, 2025, 11:19am UTC](https://meta.discourse.org/t/how-does-one-add-a-onebox-inside-a-list/373743/8 "2025-07-11T11:19:20Z")

</div>

@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.
