Alwinator / Alwinator/asciidoctor-lists

Code Issue - name_positional_attributes overwrite

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

描述

Hi Alwin,
This extension has been a great example to learn not only how to use the AsciiDoctor BlockProcessor and TreeProcessor, but also Ruby in general.

I noticed an issue with the way you define positional arguments.
https://github.com/Alwinator/asciidoctor-lists/blob/cd926c536bb0fd36985e1f7bff125e9b59fdbdb0/lib/asciidoctor-lists/extensions.rb#L14C5-L15C52

```
name_positional_attributes 'enhanced_rendering'
name_positional_attributes 'hide_empty_section'
```

I'm not sure, but should they be single line? Otherwise you're overwriting the options.

```
name_positional_attributes 'enhanced_rendering', 'hide_empty_section'
```

I ended up using named arguments in my code instead.

贡献指南

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

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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