[libc++] Fix backslash substitution in RST synchronization scripts

This commit is contained in:
Louis Dionne 2026-01-13 12:18:39 -05:00
parent f07877b2ea
commit bd40d567e0

View File

@ -54,7 +54,7 @@ def rst_to_markdown(text: str) -> str:
def markdown_to_rst(text: str) -> str:
"""Best effort conversion from Markdown to RST assuming a single line of text."""
return text.replace('`', '``')
return re.sub(r'(?<!`)`(?!`)', '``', text)
class PaperStatus:
TODO = 1