docs(README): document how to work with :c:macro: role limitation (#9700)

This commit is contained in:
Victor Wheeler
2026-02-08 23:56:18 -07:00
committed by GitHub
parent 86abea1878
commit b6dea30b74
+10
View File
@@ -352,6 +352,16 @@ Use the following Interpreted Text Roles in text to include in-line C code that
:cpp:struct:`lv_image_dsc_t`
:cpp:union:`lv_style_value_t`
**Note:** Doxygen documentation for macros with parameters works perfectly, but Sphinx does not yet know how to parse the parameter(s) on a macro that might look like this:
```rst
:c:macro:`LV_FREETYPE_FONT_STYLE_WEIGHT(x)`
```
Here is how to make that work, look right in the document, and also produce a link to Doxygen documentation if there is any:
```rst
:c:macro:`LV_FREETYPE_FONT_STYLE_WEIGHT`\ (x)
```
#### More Complex Expressions
Use the `:cpp:expr:` Interpreted Text Role for more complex expressions, for example when showing the arguments passed to a function.