How can I work with the type content in show rules to check for content and maybe even change it?

This gave me a different error: “Maximum grouping depth exceeded”. I understand this is because a single list item is treated as a list with one item, which again results in the show rule being applied, etc. Normally I’d expect “maximum show rule depth exceeded”, but I guess this results in both the show rule and grouping depth rising, and the maximum grouping depth is lower.

One way around this (since you presumably want to do more with the list item anyway) is to use repr(...):

#show list: it => {
  repr(it.children.at(0))
}

The next step would be to access the body:

#show list: it => {
  it.children.at(0).body
}

Neither leads to the same problem, since the problem was not with the access but with the specific intermediate element :slight_smile:


I know that was pretty specific for this one problem, but maybe it already helps you. For more information, I would recommend these two topics:

Maybe these help you narrowing down your issues. Feel free to follow up here with a more concrete question :slight_smile:

3 Likes