✨ feature: Implement Gmail message fetching and Excel sheet name truncation
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
const invalidSheetCharacters = /[:/\\?*[\]]/g;
|
||||
|
||||
export function sanitizeSheetName(input: string): string {
|
||||
export function sanitizeSheetName(input: string, maxLength = 100): string {
|
||||
const cleaned = input.replace(invalidSheetCharacters, ' ').replace(/\s+/g, ' ').trim();
|
||||
return (cleaned || 'Newsletter').slice(0, 100);
|
||||
return (cleaned || 'Newsletter').slice(0, maxLength);
|
||||
}
|
||||
|
||||
export function escapeCell(value: unknown): unknown {
|
||||
|
||||
Reference in New Issue
Block a user