Skip to content

Commit e3ef477

Browse files
ofriwclaude
andcommitted
Disable line breaking post-processing in presentation generation
Remove automatic 60-character line breaking from presentation pipeline: - Remove line-breaker import and processing from generate-presentation.js - Disable fix-presentation-lines.js script with early exit - Presentations now retain AI-generated formatting without modification 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 82957a5 commit e3ef477

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

scripts/fix-presentation-lines.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ import { processPresentation } from './lib/line-breaker.js';
2121
const __filename = fileURLToPath(import.meta.url);
2222
const __dirname = dirname(__filename);
2323

24+
// Line breaking has been disabled - this script is no longer functional
25+
console.log('⚠️ Line breaking has been disabled in the presentation generation pipeline.');
26+
console.log('ℹ️ This script is no longer functional and will not modify presentations.');
27+
process.exit(0);
28+
2429
const PRESENTATIONS_DIR = join(__dirname, '../website/static/presentations');
2530

2631
/**

scripts/generate-presentation.js

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import { fileURLToPath } from 'url';
2727
import { spawn } from 'child_process';
2828
import * as readline from 'readline';
2929
import { parseMarkdownContent } from './lib/markdown-parser.js';
30-
import { processPresentation } from './lib/line-breaker.js';
3130

3231
// ES module __dirname equivalent
3332
const __filename = fileURLToPath(import.meta.url);
@@ -1406,24 +1405,13 @@ async function generatePresentation(filePath, manifest, config) {
14061405
console.log(` ✅ All ${objectivesValidation.totalObjectivesChecked} learning objective(s) are 5 words or fewer`);
14071406
}
14081407

1409-
// Apply deterministic line breaking (AFTER validation passes)
1410-
console.log(' 🔧 Applying line breaking...');
1411-
const { presentation: processedPresentation, stats } = processPresentation(presentation);
1412-
1413-
// Log statistics
1414-
if (stats.linesShortened > 0) {
1415-
console.log(` ✂️ Fixed ${stats.linesShortened} long lines (max reduction: ${stats.maxReduction} chars)`);
1416-
} else {
1417-
console.log(' ✅ No lines exceeded 60 characters');
1418-
}
1419-
1420-
// Write the line-broken version back to output file
1421-
writeFileSync(outputPath, JSON.stringify(processedPresentation, null, 2), 'utf-8');
1408+
// Write presentation to output file
1409+
writeFileSync(outputPath, JSON.stringify(presentation, null, 2), 'utf-8');
14221410

14231411
// Copy to static directory for deployment
14241412
const staticPath = join(STATIC_OUTPUT_DIR, dirname(relativePath), outputFileName);
14251413
mkdirSync(dirname(staticPath), { recursive: true });
1426-
writeFileSync(staticPath, JSON.stringify(processedPresentation, null, 2), 'utf-8');
1414+
writeFileSync(staticPath, JSON.stringify(presentation, null, 2), 'utf-8');
14271415

14281416
// Update manifest
14291417
const presentationUrl = `/presentations/${join(dirname(relativePath), outputFileName)}`;

0 commit comments

Comments
 (0)