[all-commits] [llvm/llvm-project] a58ace: [lldb][docs] Use 'any' as the default role in LLDB...

Raphael Isemann via All-commits all-commits at lists.llvm.org
Mon Jan 18 10:13:25 PST 2021


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a58aceffad61ebffb1a860763299b3307041efa6
      https://github.com/llvm/llvm-project/commit/a58aceffad61ebffb1a860763299b3307041efa6
  Author: Raphael Isemann <teemperor at gmail.com>
  Date:   2021-01-18 (Mon, 18 Jan 2021)

  Changed paths:
    M lldb/docs/conf.py
    M lldb/docs/use/python.rst
    M lldb/docs/use/variable.rst

  Log Message:
  -----------
  [lldb][docs] Use 'any' as the default role in LLDB's sphinx project

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

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D94899




More information about the All-commits mailing list