@@ -513,7 +513,6 @@ def check_images(lines: list[str]) -> list[Violation]:
513513def check_mintlify_components (lines : list [str ]) -> list [Violation ]:
514514 vs : list [Violation ] = []
515515 in_fence = False
516- callout_re = re .compile (r'^\s*<(Info|Tip|Note|Warning)\b[^>]*>' , re .IGNORECASE )
517516 tab_no_title_re = re .compile (r'<Tab(?:\s+[^>]*)?>' )
518517 tab_title_attr_re = re .compile (r'\btitle\s*=\s*"[^"]*"' )
519518 for i , line in enumerate (lines , 1 ):
@@ -522,31 +521,11 @@ def check_mintlify_components(lines: list[str]) -> list[Violation]:
522521 continue
523522 if in_fence :
524523 continue
525- if callout_re .match (line ):
526- if i > 1 and lines [i - 2 ].strip () != '' :
527- vs .append (Violation (
528- i , 'M-component-blank-before' ,
529- 'Missing blank line before Mintlify callout.' ))
530524 for m in tab_no_title_re .finditer (line ):
531525 if not tab_title_attr_re .search (m .group (0 )):
532526 vs .append (Violation (
533527 i , 'M-tab-no-title' ,
534528 '<Tab> element without a title attribute.' ))
535- # end-of-component blank
536- closer_re = re .compile (r'^\s*</(Info|Tip|Note|Warning)>\s*$' ,
537- re .IGNORECASE )
538- in_fence = False
539- for i , line in enumerate (lines , 1 ):
540- if FENCE_RE .match (line ):
541- in_fence = not in_fence
542- continue
543- if in_fence :
544- continue
545- if closer_re .match (line ):
546- if i < len (lines ) and lines [i ].strip () != '' :
547- vs .append (Violation (
548- i , 'M-component-blank-after' ,
549- 'Missing blank line after Mintlify callout.' ))
550529 return vs
551530
552531
@@ -590,10 +569,6 @@ def check_spacing(lines: list[str]) -> list[Violation]:
590569 'Two or more consecutive blank lines.' ))
591570 else :
592571 blank_run = 0
593- if line != line .rstrip ():
594- vs .append (Violation (
595- i , 'S-trailing-whitespace' ,
596- 'Line has trailing whitespace.' ))
597572 return vs
598573
599574
0 commit comments