diff --git a/CLAUDE.md b/CLAUDE.md index ccae81e..9867243 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -223,6 +223,11 @@ cd C:\Projects\pluginObsidian\handWrittenMarkdownConverter\HandTranscriptMd; nod ### Task aperti +- **Bug parser `//TABLE`** โ `src/md-parser.ts`: + - Durante un test OCR il tag di chiusura `//TABLE` รจ stato riconosciuto come tag di apertura di una nuova tabella, invece di terminare quella corrente + - I valori delle celle non sono stati inseriti nella tabella + - Verificare la logica di parsing delle righe successive al tag `//TABLE`: probabilmente una riga contenente solo `//TABLE` (o simile) viene re-interpretata come nuovo comando invece di essere ignorata/consumata + - **Keyword personalizzate nelle impostazioni** โ `src/settings.ts` + `src/md-parser.ts`: - Permettere all'utente di aggiungere keyword custom nella pagina impostazioni - Ogni keyword custom ha: nome (es. `FIRMA`), output markdown (es. `โ Mario Rossi`) diff --git a/HandTranscriptMd/src/md-parser.ts b/HandTranscriptMd/src/md-parser.ts index 53353cd..c7fb6db 100644 --- a/HandTranscriptMd/src/md-parser.ts +++ b/HandTranscriptMd/src/md-parser.ts @@ -315,17 +315,22 @@ export function expandKeywords(text: string, fnStart = 1): string { // --- TABLE multi-riga --- // Header: //TABLE Col1, Col2, Col3 // Righe: val1, val2, val3 (una per riga, virgola come separatore) - // Fine: //TABLE (tag di chiusura) oppure riga vuota / senza virgola + // Fine: //TABLE (tag di chiusura) oppure riga vuota case 'TABLE': { const headers = content.split(',').map(h => h.trim()); const rows: string[][] = []; i++; while (i < lines.length) { const rowLine = lines[i].trim(); - // Tag di chiusura: "