This is an automated email from the ASF dual-hosted git repository.

pierrejeambrun pushed a commit to branch v3-4-test
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/v3-4-test by this push:
     new c3671a86fe4 [v3-4-test] Document that the HITL operator body is 
rendered as Markdown (#75130) (#75136)
c3671a86fe4 is described below

commit c3671a86fe44819a04ff2f394bd80461414ec23e
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Oct 20 00:32:33 2026 +0200

    [v3-4-test] Document that the HITL operator body is rendered as Markdown 
(#75130) (#75136)
    
    The tutorial never said the body is Markdown, so a templated multi-line
    value showing up on one line looked like a UI bug. Single line breaks
    collapsing into spaces is standard Markdown, so document how to keep them
    instead of changing the rendering.
    (cherry picked from commit 604b23bb206c8d7211257d11a2b5d3db961cbe99)
    
    Co-authored-by: Pierre Jeambrun <[email protected]>
---
 airflow-core/docs/tutorial/hitl.rst | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/airflow-core/docs/tutorial/hitl.rst 
b/airflow-core/docs/tutorial/hitl.rst
index 62b94baa228..404d2125c3e 100644
--- a/airflow-core/docs/tutorial/hitl.rst
+++ b/airflow-core/docs/tutorial/hitl.rst
@@ -125,6 +125,34 @@ As you can see in the body of this code snippet, you can 
use XComs to get inform
 
 |
 
+Formatting the body
+-------------------
+
+The ``body`` of every HITL operator is rendered as Markdown in the UI.
+In Markdown, a single line break inside a paragraph is displayed as a space, 
so a multi-line value such as a
+templated XCom shows up on one line.
+To keep the line breaks, wrap the value in a fenced code block, or separate 
the lines with blank lines.
+
+.. code-block:: python
+
+    ApprovalOperator(
+        task_id="confirm_deletion",
+        subject="Should the following files be deleted?",
+        body="""Dry-run result:
+
+    ```
+    {{ ti.xcom_pull(task_ids='dry_run') }}
+    ```
+    """,
+    )
+
+.. versionchanged:: 3.4
+
+   Code blocks in the body keep their line breaks. On earlier versions, lines 
inside a code block are
+   also joined, so separate them with blank lines instead.
+
+|
+
 Branch Selection
 ----------------
 

Reply via email to