Dr-Denzy edited a comment on issue #16138:
URL: https://github.com/apache/airflow/issues/16138#issuecomment-851401276


   @sweco to create a code block, you have to leave a blank line between each 
line. See [PEP 257](https://www.python.org/dev/peps/pep-0257/) and [Markdown 
guidelines](https://www.markdownguide.org/basic-syntax/) for more details.
   
   This is how I did it:
   
   ```python
   from airflow import DAG
   
   DOC_MD = """\
   # Markdown code block
   
   Inline `code` works well.
   
       Code block
   
       <del>does not</del> now
   
       respect
   
       newlines
   
   """
   
   dag = DAG(
       dag_id='md-doc',
       doc_md=DOC_MD
   )
   
   ```
   
![md-doc-2](https://user-images.githubusercontent.com/9834450/120181457-63396000-c20d-11eb-9818-25e050804ab2.png)
   
   ```python
   from airflow import DAG
   
   DOC_MD = """\
   # Markdown code block
   
   Inline `code` works well.
   
       `Code block`
   
      <del>`does not`</del> `now`
   
       `respect`
   
       `newlines`
   
   """
   
   dag = DAG(
       dag_id='md-doc',
       doc_md=DOC_MD
   )
   
   ```
   
![md-doc](https://user-images.githubusercontent.com/9834450/120181913-fa9eb300-c20d-11eb-868f-e710501cd264.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to