Alwinator / Alwinator/asciidoctor-lists

Hide empty section not empty when present items have no caption

Aperta
#18 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Ruby
Stelle
46
Fork
12
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

When elements for the lists are present in the document but do not have a caption, the "hide_empty_section" option does not work properly. It will display an empty list (heading but no entries) but will not be empty (and thus removed).

This is kind of "double bad" because there is no list (even though there are items relevant to the list) but the section is also not hidden (even though it appears empty).

We produce documents using this extension and I've seen a couple reports about this recently from my users.

```
== First heading

Some text

== Second heading

|===
|A |table

|With |Data
|===

== Third heading
list-of::table[]
```

![image](https://github.com/Alwinator/asciidoctor-lists/assets/4920542/fd5baf9d-25bc-47f2-90f6-77cfe04baaf1)

```
[... same code as above but with table caption]

== First heading

Some text

== Second heading

.Now with caption!
|===
|A |table

|With |Data
|===

== Third heading
list-of::table[]

```
![image](https://github.com/Alwinator/asciidoctor-lists/assets/4920542/f3708a55-fb83-4b30-b6b9-22d3b752b74f)

I think the list should show "something" even when there is no caption present, maybe something like "Unnamed table"?
Maybe also a warning in the console that the extension has detected that items that are relevant are present but do not have a caption.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.