[libc-commits] [libc] [libc][docs] adds highlighting languages to `docs/dev/config_options.rst` (PR #89136)

Michael Flanders via libc-commits libc-commits at lists.llvm.org
Wed Apr 17 13:23:06 PDT 2024


https://github.com/Flandini created https://github.com/llvm/llvm-project/pull/89136

Fixes #89135.

>From 0579f34e5426f8d3b175fc45584f79f557abcaa3 Mon Sep 17 00:00:00 2001
From: Michael Flanders <flanders.michaelk at gmail.com>
Date: Wed, 17 Apr 2024 13:22:01 -0700
Subject: [PATCH] adds highlighting language to docs/dev/config_options.rst

---
 libc/docs/dev/config_options.rst | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/libc/docs/dev/config_options.rst b/libc/docs/dev/config_options.rst
index 47f4baef8ebf1a..d41508c81e7906 100644
--- a/libc/docs/dev/config_options.rst
+++ b/libc/docs/dev/config_options.rst
@@ -11,15 +11,14 @@ hierarchical JSON files. At the top of the hierarchy is a JSON file by name
 options which affect all platforms. The default value for the option and a short
 description about it listed against each option. For example:
 
-.. code-block::
+.. code-block:: json
 
    {
      "printf": {
        "LIBC_CONF_PRINTF_DISABLE_FLOAT": {
          "value": false,
          "doc": "Disable printing floating point values in printf and friends."
-       },
-       ...
+       }
      }
    }
 
@@ -28,7 +27,7 @@ has a value of ``false``. A platform, say the baremetal platform, can choose
 to override this value in its ``config.json`` file in the ``config/baremetal``
 directory with the following contents:
 
-.. code-block::
+.. code-block:: json
 
    {
      "printf": {
@@ -61,14 +60,13 @@ The value corresponding to each grouping tag is also a dictionary called the
 options belonging to that grouping tag. For the ``printf`` tag in the above
 example, the option-dictionary is:
 
-.. code-block::
+.. code-block:: json
 
    {
      "LIBC_CONF_PRINTF_DISABLE_FLOAT": {
        "value": false,
        "doc":
-     },
-     ...
+     }
    }
 
 The value corresponding to an option key in the option-dictionary is another
@@ -86,7 +84,7 @@ Option name format
 
 The option names, or the keys of a option-dictionary, have the following format:
 
-.. code-block::
+.. code-block:: none
 
    LIBC_CONF_<UPPER_CASE_TAG_NAME>_<ACTION_INDICATING_THE_INTENDED_SEMANTICS>
 
@@ -123,7 +121,7 @@ should convert the CMake config options to appropriate compiler and/or linker
 flags. Those compile/link flags can be used in listing the affected targets as
 follows:
 
-.. code-block::
+.. code-block:: none
 
    add_object_library(
     ...



More information about the libc-commits mailing list