phpDocumentor / phpDocumentor/guides

[Bug]: Roles cannot be checked as they are not defined

Open
#925 1 comment 0 reactions 1 assignee View on GitHub

@linawolf is already working on this.

Since Mar 14, 2024.

bug triage
Dominant language
PHP
Stars
36
Forks
22
Avg merge
2d 2h
Merged PRs (30d)
24

Description

Summary

Roles, like

:sql:`SELECT * FROM table`

are not defined, so typos or unsupported roles cannot be warned about, like (mind the g instead the q):

:sgl:`SELECT * FROM table`

In Sphinx, custom roles have to be defined:
https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#inline-code-highlighting

On rendering, Sphinx displays an error about an unknown role:

 ERROR: Unknown interpreted text role "sgl".

This way, the user can spot the error and correct it.

Guides holds no definition of custom roles and therefore cannot warn about it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.