what have i done
This commit is contained in:
30
scripts/csound-parser/debug-section.ts
Normal file
30
scripts/csound-parser/debug-section.ts
Normal file
@ -0,0 +1,30 @@
|
||||
import * as fs from 'fs';
|
||||
|
||||
const content = fs.readFileSync('downloaded-opcodes/moogladder.md', 'utf-8');
|
||||
|
||||
console.log('Full content length:', content.length);
|
||||
console.log('\n=== Testing extractSection regex ===\n');
|
||||
|
||||
const regex = /##\s+Syntax\s*\n([\s\S]*?)(?=\n##|$)/i;
|
||||
const match = content.match(regex);
|
||||
|
||||
if (match) {
|
||||
console.log('Match found!');
|
||||
console.log('Captured content length:', match[1].length);
|
||||
console.log('\nFull captured content:');
|
||||
console.log('---START---');
|
||||
console.log(match[1]);
|
||||
console.log('---END---');
|
||||
} else {
|
||||
console.log('No match found');
|
||||
}
|
||||
|
||||
// Also check what comes after
|
||||
const syntaxIndex = content.indexOf('## Syntax');
|
||||
const examplesIndex = content.indexOf('## Examples');
|
||||
console.log('\n=== Indices ===');
|
||||
console.log('## Syntax at:', syntaxIndex);
|
||||
console.log('## Examples at:', examplesIndex);
|
||||
console.log('Distance:', examplesIndex - syntaxIndex);
|
||||
console.log('\nContent between (first 500 chars):');
|
||||
console.log(content.substring(syntaxIndex, syntaxIndex + 500));
|
||||
Reference in New Issue
Block a user