@@ -326,19 +326,31 @@ export async function updateSearchIndex(
326326
327327        // If there are any paragraphs residing outside a section, just 
328328        // include that in the document entry 
329-         const  pararaphNodes  =  doc . querySelectorAll ( 
330-           `${ mainSelector }   > p, ${ mainSelector }   > div.cell` , 
329+         const  paragraphNodes  =  doc . querySelectorAll ( 
330+           `${ mainSelector }   > p, ${ mainSelector }   > div.cell, main > p ` , 
331331        ) ; 
332332
333-         for   ( const  paragraphNode   of   pararaphNodes )  { 
333+         const  addToIndex   =   ( paragraphNode :  Element )   =>  { 
334334          const  text  =  paragraphNode . textContent . trim ( ) ; 
335335          if  ( text )  { 
336336            pageText . push ( text ) ; 
337337          } 
338338
339339          // Since these are already indexed with the main entry, remove them 
340340          // so they are not indexed again 
341-           ( paragraphNode  as  Element ) . remove ( ) ; 
341+           paragraphNode . remove ( ) ; 
342+         } ; 
343+ 
344+         for  ( const  paragraphNode  of  paragraphNodes )  { 
345+           addToIndex ( paragraphNode  as  Element ) ; 
346+         } 
347+ 
348+         // Add forced inclusions to the index 
349+         const  forcedInclusions  =  doc . querySelectorAll ( 
350+           `.quarto-include-in-search-index` , 
351+         ) ; 
352+         for  ( const  forcedInclusion  of  forcedInclusions )  { 
353+           addToIndex ( forcedInclusion  as  Element ) ; 
342354        } 
343355
344356        if  ( pageText . length  >  0 )  { 
0 commit comments