adoroszlai commented on code in PR #9846:
URL: https://github.com/apache/ozone/pull/9846#discussion_r2867132417
##########
dev-support/ci/xml_to_md.py:
##########
@@ -107,9 +107,11 @@ def generate_markdown(properties):
"""
for prop in sorted(properties.values(), key=lambda p: p.name):
- # Escape pipe characters in description to prevent breaking the table
+ # Escape pipe characters and wrap {placeholders} in backticks
description = prop.description.replace('|', '\\|')
- value = prop.value if prop.value else ''
+ description = re.sub(r'(\$)?\{([^}]+)\}', r'`\1{\2}`', description)
+ value = prop.value.replace('|', '\\|') if prop.value else ''
+ value = re.sub(r'(\$)?\{([^}]+)\}', r'`\1{\2}`', value) if value else ''
Review Comment:
nit: it would be nice to `re.compile` the pattern before the loop
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]