@@ -507,6 +507,54 @@ describe('content-start-position', () => {
507507 expect ( result . status ) . toBe ( 'pass' ) ;
508508 } ) ;
509509
510+ // ── Table content after headings (issue #20) ──
511+
512+ it ( 'detects markdown table as content after heading' , async ( ) => {
513+ const html = `<html><body>
514+ <h1>Limits for Scheduled Triggers</h1>
515+ <table><tr><th>Trigger interval</th><th>Max executions</th></tr>
516+ <tr><td>Every 5 minutes</td><td>50 per hour</td></tr></table>
517+ </body></html>` ;
518+
519+ server . use (
520+ http . get (
521+ 'http://test.local/docs/table-after-heading' ,
522+ ( ) => new HttpResponse ( html , { status : 200 , headers : { 'Content-Type' : 'text/html' } } ) ,
523+ ) ,
524+ ) ;
525+
526+ const result = await check . run ( singlePageCtx ( '/docs/table-after-heading' ) ) ;
527+ expect ( result . status ) . toBe ( 'pass' ) ;
528+ } ) ;
529+
530+ it ( 'detects markdown table in .md content as content after heading' , async ( ) => {
531+ const md = `# Limits\n\n| Trigger interval | Max executions |\n|-----------------|----------------|\n| Every 5 minutes | 50 per hour |\n` ;
532+
533+ server . use (
534+ http . get (
535+ 'http://test.local/docs/table-md' ,
536+ ( ) => new HttpResponse ( md , { status : 200 , headers : { 'Content-Type' : 'text/markdown' } } ) ,
537+ ) ,
538+ ) ;
539+
540+ const result = await check . run ( singlePageCtx ( '/docs/table-md' ) ) ;
541+ expect ( result . status ) . toBe ( 'pass' ) ;
542+ } ) ;
543+
544+ it ( 'detects HTML table in .md content as content after heading' , async ( ) => {
545+ const md = `# Limits\n\n<table>\n <tr><th>Col A</th><th>Col B</th></tr>\n <tr><td>val</td><td>val</td></tr>\n</table>\n` ;
546+
547+ server . use (
548+ http . get (
549+ 'http://test.local/docs/table-html-in-md' ,
550+ ( ) => new HttpResponse ( md , { status : 200 , headers : { 'Content-Type' : 'text/markdown' } } ) ,
551+ ) ,
552+ ) ;
553+
554+ const result = await check . run ( singlePageCtx ( '/docs/table-html-in-md' ) ) ;
555+ expect ( result . status ) . toBe ( 'pass' ) ;
556+ } ) ;
557+
510558 // ── Lines that don't match any skip pattern and aren't prose ──
511559
512560 it ( 'skips short multi-word non-prose lines (breadcrumbs)' , async ( ) => {
0 commit comments