Skip to content

Default role not found in indented block #108

@hugovk

Description

@hugovk

Given this (based on https://github.com/python/cpython/blob/9f088336b268dfe9011a7cb550f4e488ccd7e8f5/Doc/library/code.rst?plain=1):

.. c:type:: int (*PyCode_WatchCallback)(PyCodeEvent event, PyCodeObject* co)

   Not detected:

   If *event* is ``PY_CODE_EVENT_CREATE``, then the callback is invoked
   after `co` has been fully initialized. Otherwise, the callback is invoked
   before the destruction of *co* takes place, so the prior state of *co*
   can be inspected.

Detected:

If *event* is ``PY_CODE_EVENT_CREATE``, then the callback is invoked
after `co` has been fully initialized. Otherwise, the callback is invoked
before the destruction of *co* takes place, so the prior state of *co*
can be inspected.

Sphinx Lint only finds the second `co`:

sphinx-lint --enable=default-role 1.rst
1.rst:13: default role used (hint: for inline literals, use double backticks) (default-role)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions