The raw input content to preprocess
The format of the input ('yaml', 'json', or 'csv')
The preprocessed content with quotes properly escaped, or original input if unchanged/error
// Fix broken YAML
preprocessQuotes('desc: "say "hi""', 'yaml');
// Returns: 'desc: "say \\"hi\\""'
// Fix broken JSON
preprocessQuotes('{"a": "say "hi""}', 'json');
// Returns: '{"a": "say \\"hi\\""}'
// Fix broken CSV
preprocessQuotes('A,B\\n1,"say "hi""', 'csv');
// Returns: 'A,B\\n1,"say ""hi"""'
Preprocess quotes in input content.
Automatically detects and escapes unescaped quote characters based on format. Returns the input unchanged if no broken quotes are detected or if an error occurs.