You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/03/13 04:47:21 UTC

[GitHub] [airflow] uranusjr commented on a change in pull request #19702: Switch Markdown engine to markdown-it-py

uranusjr commented on a change in pull request #19702:
URL: https://github.com/apache/airflow/pull/19702#discussion_r825387595



##########
File path: tests/www/test_utils.py
##########
@@ -160,7 +160,7 @@ def setUp(self):
         self.attr_renderer = utils.get_attr_renderer()
 
     def test_python_callable(self):
-        def example_callable(unused_self):
+        def example_callable():

Review comment:
       Why change this?

##########
File path: airflow/www/utils.py
##########
@@ -479,10 +479,11 @@ def json_render(obj, lexer):
 
 def wrapped_markdown(s, css_class='rich_doc'):
     """Convert a Markdown string to HTML."""
+    md = MarkdownIt("gfm-like")
     if s is None:
         return None
     s = textwrap.dedent(s)
-    return Markup(f'<div class="{css_class}" >' + markdown.markdown(s, extensions=['tables']) + "</div>")
+    return Markup(f'<div class="{css_class}" >' + md.render(s) + "</div>")

Review comment:
       ```suggestion
       return Markup(f'<div class="{css_class}" >{md.render(s)}</div>')
   ```




-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org