processing-r/Processing.R

Docs: hide Syntax when empty

jeremydouglass opened this issue · 0 comments

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 %}