File tree Expand file tree Collapse file tree
.github/workflows/scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,17 +33,26 @@ foreach ($path in $possiblePaths) {
3333 Write-Host " Checking: $path "
3434 if (Test-Path $path ) {
3535 $content = Get-Content - Path $path - Raw - Encoding UTF8
36+ Write-Host " File size: $ ( $content.Length ) chars"
37+
3638 # Check if file has actual QnA content (not just imports)
37- if ($content -match " ^#{1,2}\s*\?\s*.+$" -and $content.Length -gt 100 ) {
39+ # Use (?m) for multiline mode so ^ matches start of each line
40+ if ($content -match " (?m)^#\s*\?\s*.+" -and $content.Length -gt 100 ) {
3841 $inputFilePath = $path
3942 $qnaContent = $content
40- Write-Host " Found QnA content in: $path "
43+ Write-Host " Found QnA content! "
4144 break
4245 }
4346 else {
44- Write-Host " File exists but may only contain imports: $path "
47+ Write-Host " No QnA questions found (pattern: # ? question)"
48+ # Show first 200 chars for debugging
49+ $preview = if ($content.Length -gt 200 ) { $content.Substring (0 , 200 ) } else { $content }
50+ Write-Host " Preview: $preview "
4551 }
4652 }
53+ else {
54+ Write-Host " File not found"
55+ }
4756}
4857
4958if (-not $inputFilePath -or -not $qnaContent ) {
You can’t perform that action at this time.
0 commit comments