Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s: Halt build on pfsc- directives with bad opt block in Sphinx pages #94

Merged
merged 1 commit into from
Jul 20, 2024

Conversation

skieffer
Copy link
Member

It will likely be a common error in Sphinx pages, to have an invalid option block in pfsc- directives whenever a PF-JSON object is the value of any of the data fields. This is because there may be a tendency to indent the closing brace in line with the option name, like this:

.. pfsc-chart::
    :view: Thm.C
    :viewOpts: {
        transition: false,
    }

whereas in fact it needs to be indented deeper than the option name, like this:

.. pfsc-chart::
    :view: Thm.C
    :viewOpts: {
        transition: false,
        }

Up to now, an error of this kind, which Sphinx calls an "invalid option block" is simply reported by Sphinx as a warning, which does not halt the build process. In such a case, the widget simply produces no HTML whatsoever. This means you can have a "successful" build, and yet wind up with a Sphinx page in which one or more of your widgets simply does not appear at all.

We now elevate such Sphinx warnings to actual build-halting errors, so that the user is made aware of the issue.

@skieffer skieffer added the server server-side (all or primarily) label Jul 20, 2024
@skieffer skieffer merged commit 0c0d28d into proofscape:main Jul 20, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
server server-side (all or primarily)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant