user2561747
user2561747

Reputation: 1394

sphinx severe: unexpected section title -- arbitrary headings in function docstring

Using autodoc and similar tools allows one to compile documentation from source docstrings. It doesn't however, seem to allow arbitrary ReST section titles in function or class docstrings, and produces the error:

SEVERE: Unexpected section title.

I encoutered a similar problem when trying to document following the numpy style guidelines without numpydoc: unexpected section title with sphinx is numpy the issue and how does numpy process docstrings into sphinx documentation for parameters

Here however, I'm actually documenting JavaScript and would simply like to have arbitrary section titles and ReST in a docstring.

Javascript docstring api: sphinx jsapidoc

Upvotes: 12

Views: 2199

Answers (1)

J_H
J_H

Reputation: 20568

Yes, the requirement to add arbitrary section titles and ReST within a docstring can pose challenges; sphinx-jsapidoc is effective for this requirement.

Upvotes: 1

Related Questions