This is an archive of the discontinued LLVM Phabricator instance.

[lldb][docs] Use 'any' as the default role in LLDB's sphinx project
ClosedPublic

Authored by teemperor on Jan 18 2021, 2:29 AM.

Details

Summary

sphinx processes text in backticks depending on what 'role' it has (e.g., :code:\blub\` -> role is code`).
If no role is provided, the default role is taken which is right now using the default value of content.
content only really makes the text cursive which isn't really useful for anything right now.

Sphinx recommends using the any role by default [1] as that turns text in backticks without an explicit
roles into some kind of smart reference. If we did this in LLDB, then we could just reference SB API classes
by doing \SBValue\` instead of typing out the rather verbose :py:class:/:py:func:`/... role before each reference.
This would be especially nice when writing the SB API docs itself as we constantly have to reference other classes.

[1] https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#role-any

Diff Detail

Event Timeline

teemperor requested review of this revision.Jan 18 2021, 2:29 AM
teemperor created this revision.
JDevlieghere accepted this revision.Jan 18 2021, 9:01 AM

Cool. That was one of the reasons I suggested having the SB API documentation integrated with the rest of the docs.

This revision is now accepted and ready to land.Jan 18 2021, 9:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 18 2021, 10:08 AM