Setting element "span" instead of element "p"

Schimon Jehudah via Docutils-users <[email protected]> Fri, 25 Jul 2025 11:29:04 +0300
Newsgroups gmane.text.docutils.user
Message-ID <[email protected]>
Good day.

Is it feasible to set the routine (i.e. default) element to "span", or any
other element, instead of element "p"?

>>> from docutils.core import publish_parts
>>> publish_parts(source="This an XHTML text with a `link <https://movim.eu>`_ for XMPP PubSub", writer_name="xhtml")["fragment\
"]
'<p>This an XHTML text with a <a class="reference external" href="https://movim.eu">link</a> for XMPP PubSub</p>\n'

Kind regards,
Schimon