File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -368,12 +368,12 @@ module.exports = {
368368 const ogImageURL = new URL ( 'https://apify.com/og-image/docs-article' ) ;
369369 ogImageURL . searchParams . set ( 'title' , result . frontMatter . title ) ;
370370 result . frontMatter . image ??= ogImageURL . toString ( ) ;
371- }
372371
373- // Extract the first sentence (ending with . ! or ?) even if it spans multiple lines
374- const contentText = result . content . replace ( / \n + / g, ' ' ) . replace ( / \s + / g, ' ' ) . trim ( ) ;
375- const sentenceMatch = contentText . match ( / ^ ( .* ?[ . ! ? ] ) \s / ) ;
376- result . frontMatter . description = sentenceMatch ? sentenceMatch [ 1 ] . trim ( ) : contentText ;
372+ // Extract the first sentence (ending with . ! or ?) even if it spans multiple lines
373+ const contentText = result . content . replace ( / \n + / g, ' ' ) . replace ( / \s + / g, ' ' ) . trim ( ) ;
374+ const sentenceMatch = contentText . match ( / ^ ( .* ?[ . ! ? ] ) \s / ) ;
375+ result . frontMatter . description = sentenceMatch ? sentenceMatch [ 1 ] . trim ( ) : contentText ;
376+ }
377377
378378 return result ;
379379 } ,
You can’t perform that action at this time.
0 commit comments