-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Was just re-checking support with sphinx-note's strike with sphinxcontrib-confluencebuilder and noticed it is not working as expected. It looks to have been not working since v1.2 release due to the changes from #2 (specifically, 3ec9e3c). While sphinxcontrib-confluencebuilder does have the translation support to handle a strike node (as mentioned in #7 (comment)), since the role will not generate a strike node for unsupported builders, there will be no strike node to translate for this (or other builders).
It appears to me that the internal fallback was made to avoid docutil's developer strict-node check from failing. It appears the only way another extension can flag support for the node type is to manipulate a global supported builders list (#7), which does not feel like a "right" approach.
A suggestion, if desired, is maybe add an attribute flag that third-party builders can set to hint support for a given node type. For example, we added support for Sphinx's linkcode extension to allow external builders hint support using a supported_linkcode attribute. Maybe this extension could add support for a supported_sphinxnotes_strike attribute, where a third-party extension could define something such as:
class ConfluenceBuilder(Builder):
supported_sphinxnotes_strike = True
...
And maybe sphinx-note's strike extension could adjust the check to something such as:
builder = env.app.builder
if not isinstance(builder, tuple(SUPPORTED_BUILDERS)) and \
not getattr(builder, 'supported_sphinxnotes_strike', None):
...