Explorar o código

Fix the formatting in the chain extension documentation (#1309)

Signed-off-by: xermicus <cyrill@parity.io>
Cyrill Leutwiler %!s(int64=2) %!d(string=hai) anos
pai
achega
38d3bee7c2
Modificáronse 1 ficheiros con 8 adicións e 7 borrados
  1. 8 7
      docs/language/builtins.rst

+ 8 - 7
docs/language/builtins.rst

@@ -322,19 +322,20 @@ The caller is responsible for encoding the input and decoding the output correct
 We expect parachain authors to write their own higher level libraries on top.
 
 .. warning::
-    This function calls the runtime API `call_chain_extension <https://docs.rs/pallet-contracts/latest/pallet_contracts/api_doc/trait.Version0.html#tymethod.call_chain_extension>`.
+    This function calls the runtime API `call_chain_extension <https://docs.rs/pallet-contracts/latest/pallet_contracts/api_doc/trait.Version0.html#tymethod.call_chain_extension>`_.
+
 	It assumes that the implementation of the chain extension
-	- reads the input from the ``input_ptr`` parameter, used as a buffer pointer
-	- writes potential output into the buffer found at the ``output_ptr`` pointer
-	- respects the output buffer length in ``output_len_ptr`` to prevent OOB writes. The output buffer is 16KB in size.
-	- writes the amount of bytes written to ``output_ptr`` into the buffer at ``output_len_ptr``
-	
+	    - reads the input from the ``input_ptr`` parameter, used as a buffer pointer
+	    - writes potential output into the buffer found at the ``output_ptr`` pointer
+	    - respects the output buffer length in ``output_len_ptr`` to prevent OOB writes. The output buffer is 16KB in size.
+	    - writes the amount of bytes written to ``output_ptr`` into the buffer at ``output_len_ptr``
+
 	Unlike with other runtime API calls, the contracts pallet can not guarantee this behaviour.
 	Instead, it's specific to the targeted chain runtime. Hence, when using this builtin,
 	you must be sure that the implementation being called underneath is compatible.
 
 The following example demonstrates the usage of this builtin function.
-It shows how the chain extension example from the <ink! documentation https://use.ink/macros-attributes/chain-extension/>
+It shows how the chain extension example from the `ink! documentation <https://use.ink/macros-attributes/chain-extension/>`_
 looks like in a solidity contract:
 
 .. include:: ../examples/substrate/call_chain_extension.sol