File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -58,8 +58,9 @@ function isAIOrDevTool(userAgent: string): boolean {
5858 * Detects if client wants markdown via Accept header (standards-compliant)
5959 */
6060function wantsMarkdownViaAccept ( acceptHeader : string ) : boolean {
61- return acceptHeader . includes ( 'text/markdown' ) ||
62- acceptHeader . includes ( 'text/x-markdown' ) ;
61+ return (
62+ acceptHeader . includes ( 'text/markdown' ) || acceptHeader . includes ( 'text/x-markdown' )
63+ ) ;
6364}
6465
6566/**
@@ -93,8 +94,11 @@ const handleAIClientRedirect = (request: NextRequest) => {
9394 ( clientWantsMarkdown || forceMarkdown ) && ! url . pathname . endsWith ( '.md' ) ;
9495
9596 // Determine detection method for logging
96- const detectionMethod = wantsMarkdownViaAccept ( acceptHeader ) ? 'Accept header' :
97- isAIOrDevTool ( userAgent ) ? 'User-agent' : 'Manual' ;
97+ const detectionMethod = wantsMarkdownViaAccept ( acceptHeader )
98+ ? 'Accept header'
99+ : isAIOrDevTool ( userAgent )
100+ ? 'User-agent'
101+ : 'Manual' ;
98102
99103 // Log user agent for debugging (only for non-static assets)
100104 if (
You can’t perform that action at this time.
0 commit comments