diff --git a/documentation/security-manual/vulnerabilities.rst b/documentation/security-manual/vulnerabilities.rst
index 38fbd2c7e358..8525464b90a5 100644
--- a/documentation/security-manual/vulnerabilities.rst
+++ b/documentation/security-manual/vulnerabilities.rst
@@ -224,7 +224,9 @@ Modify the patch adding OE-related metadata. We will follow the example of the
 ``CVE-2022-3341.patch``.
 
 The original `commit message <https://github.com/FFmpeg/FFmpeg/commit/9cf652cef49d74afe3d454f27d49eb1a1394951e.patch/>`__
-is::
+is:
+
+.. code-block:: diff
 
    From 9cf652cef49d74afe3d454f27d49eb1a1394951e Mon Sep 17 00:00:00 2001
    From: Jiasheng Jiang <jiasheng@iscas.ac.cn>
@@ -242,7 +244,9 @@ is::
 
 For the correct operations of :ref:`ref-classes-sbom-cve-check`, it requires the CVE
 identification in a ``CVE:`` tag of the patch file commit message using
-the format::
+the format:
+
+.. code-block:: text
 
    CVE: CVE-2022-3341
 
@@ -251,7 +255,9 @@ to the original patch and sign-off by people working on the backport.
 If there are any modifications to the original patch, note them in
 the ``Comments:`` tag.
 
-With the additional information, the header of the patch file in OE-core becomes::
+With the additional information, the header of the patch file in OE-core becomes:
+
+.. code-block:: diff
 
    From 9cf652cef49d74afe3d454f27d49eb1a1394951e Mon Sep 17 00:00:00 2001
    From: Jiasheng Jiang <jiasheng@iscas.ac.cn>
