File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
apps/svelte.dev/src/lib/server Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,11 @@ export function generate_llm_content(options: GenerateLlmContentOptions): string
4141
4242 for ( const [ path , document ] of Object . entries ( index ) ) {
4343 if ( ! path . startsWith ( `docs/${ section . slug } ` ) ) continue ;
44- if ( ! should_include_file_llm_docs ( path , options . ignore ) ) continue ;
44+
45+ if ( options . ignore ?. some ( ( pattern ) => minimatch ( path , pattern ) ) ) {
46+ if ( dev ) console . log ( `❌ Ignored by pattern: ${ path } ` ) ;
47+ continue ;
48+ }
4549
4650 const doc_content = options . minimize
4751 ? minimize_content ( document . body , options . minimize )
@@ -106,15 +110,6 @@ function minimize_content(content: string, options?: Partial<MinimizeOptions>):
106110 return minimized ;
107111}
108112
109- function should_include_file_llm_docs ( path : string , ignore : string [ ] = [ ] ) : boolean {
110- if ( ignore . some ( ( pattern ) => minimatch ( path , pattern ) ) ) {
111- if ( dev ) console . log ( `❌ Ignored by pattern: ${ path } ` ) ;
112- return false ;
113- }
114-
115- return true ;
116- }
117-
118113function remove_quote_blocks ( content : string , blockType : string ) : string {
119114 return content
120115 . split ( '\n' )
You can’t perform that action at this time.
0 commit comments