Skip to content

Docs: hide Syntax when empty #234

Open
@jeremydouglass

Description

@jeremydouglass

In the docs / docs generator, "Syntax" heading is getting displayed even if there is no syntax entry (or if the entry is whitespace).

We would expect that "Syntax" would not display if empty.

Here is the check on the jinja template, which may need to be expanded:

https://github.com/processing-r/Processing.R-docs-tools/blob/85aacd25c3909c14b0e402a1e7dc89a075bbb78a/templates/reference_item_template.jinja#L36

    {% if item.syntax is not none %} {# To keep lxml from yelling at us about unstable APIs #}
        <tr class=""><th scope="row">Syntax</th><td><pre>{{ item.syntax }}</pre></td></tr>
    {% endif %}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions