@@ -903,6 +903,7 @@ def diff_report(args: argparse.Namespace) -> int:
903903_AUDIT_VISIBLE_ZWNJ_RE = re .compile (r"‌" )
904904_AUDIT_VISIBLE_NBSP_RE = re .compile (r" " )
905905_AUDIT_VISIBLE_DOUBLE_AMP_RE = re .compile (r"&" )
906+ _AUDIT_OPEN_DOUBLE_BACKTICK_RE = re .compile (r"\\`\\`" )
906907_AUDIT_SYNOPSIS_HEADING_RE = re .compile (r"^#+\s+SYNOPSIS\s*$" , re .IGNORECASE )
907908_AUDIT_WHITESPACE_RE = re .compile (r"\s" )
908909_AUDIT_UNICODE_ESCAPE_RE = re .compile (r"^u[0-9A-Fa-f]{4,6}$" )
@@ -1198,6 +1199,14 @@ def _audit_scan_visible_double_amp(markdown: str, html: str) -> list[tuple[int,
11981199 ]
11991200
12001201
1202+ def _audit_scan_open_double_backtick (markdown : str , html : str ) -> list [tuple [int , str ]]:
1203+ hits : list [tuple [int , str ]] = []
1204+ for line_no , line in enumerate (markdown .splitlines (), 1 ):
1205+ for match in _AUDIT_OPEN_DOUBLE_BACKTICK_RE .finditer (line ):
1206+ hits .append ((line_no , _audit_snippet (line , match .start (), match .end ())))
1207+ return hits
1208+
1209+
12011210def _audit_scan_giant_markdown_line (markdown : str , html : str ) -> list [tuple [int , str ]]:
12021211 hits : list [tuple [int , str ]] = []
12031212 for line_no , line in enumerate (markdown .splitlines (), 1 ):
@@ -1262,6 +1271,11 @@ def _audit_scan_synopsis_no_spaces_run(
12621271 _audit_scan_visible_double_amp ,
12631272 "double-encoded ampersand &" ,
12641273 ),
1274+ (
1275+ "visible_open_double_backtick" ,
1276+ _audit_scan_open_double_backtick ,
1277+ r"literal `\`\`` in markdown (asymmetric typographic open quote)" ,
1278+ ),
12651279 (
12661280 "giant_markdown_line" ,
12671281 _audit_scan_giant_markdown_line ,
0 commit comments