@mintlify/cli 4.0.1751 → 4.0.1753

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1074,6 +1074,24 @@ describe('validate rules', () => {
1074
1074
  '<hr> must be self-closed',
1075
1075
  ]);
1076
1076
  });
1077
+
1078
+ it('flags HTML void elements but not components, custom elements or SVG image', async () => {
1079
+ write(dir, {
1080
+ 'index.mdx':
1081
+ '---\ntitle: Home\n---\n\n<video>\n <source src="a.mp4">\n</video>\n\n<input type="checkbox">\n\n<Source src="b.mp4" />\n\n<source-list>x</source-list>\n\n<svg><image href="/d.png"><title>D</title></image></svg>\n',
1082
+ });
1083
+
1084
+ const { issues } = await check(dir, { rules: ['void-tags'] });
1085
+ expect(issues.map(({ line, message }) => [line, message])).toEqual([
1086
+ [6, '<source> must be self-closed'],
1087
+ [9, '<input> must be self-closed'],
1088
+ ]);
1089
+
1090
+ await check(dir, { rules: ['void-tags'], fix: true });
1091
+ const content = read('index.mdx');
1092
+ expect(content).toContain('<source src="a.mp4" />');
1093
+ expect(content).toContain('<input type="checkbox" />');
1094
+ });
1077
1095
  });
1078
1096
 
1079
1097
  describe('maskNonMarkup', () => {