pierrejeambrun commented on code in PR #50142: URL: https://github.com/apache/airflow/pull/50142#discussion_r2075484289
########## task-sdk/src/airflow/sdk/definitions/dag.py: ########## @@ -185,7 +185,18 @@ def _convert_doc_md(doc_md: str | None) -> str | None: return fh.read() except FileNotFoundError: return doc_md + return doc_md + +def _clean_doc_md(doc_md: str) -> str: + # alternative to using math.inf, the linter doesn't like inf being a float + strip_count = len(doc_md) + + for line in doc_md.split("\n"): + if line != "": + strip_count = min(strip_count, len(line) - len(line.lstrip())) + if strip_count > 0: + doc_md = "\n".join([line[strip_count:] for line in doc_md.split("\n")]) Review Comment: Good idea @tirkarthi we can do that on the api server, so we don't modify what's in the db in the first place. -- 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-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org