Skip to content

Commit 003472b

Browse files
committed
fix: Do not render external header when the missing name is not required
1 parent a96ca04 commit 003472b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/sphinxnotes/any/domain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ def _require_external_header(self, schema: Schema, data: RawData) -> bool:
432432
#
433433
# The special underscore is for compatible with sphinxnotes-any<3.
434434
# See also https://sphinx.silverrainz.me/any/tips.html#documenting-section-and-documentation
435-
if not schema.name:
435+
if not schema.name or not schema.name.required:
436436
return False
437437
if schema.name.ctype is None:
438438
return data.name in (None, '_')

0 commit comments

Comments
 (0)