Alwinator / Alwinator/asciidoctor-lists

Hide empty section not empty when present items have no caption

未关闭
#18 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Ruby
星标
46
派生
12
PR 合并指标
30 天内没有已合并 PR

描述

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.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。