apply method
Implementation
@override
Future<String> apply(String content, Map<String, dynamic> context) async {
return content.replaceAllMapped(_ddRegex, (match) {
final expr = match.group(1)!.trim();
try {
final value = _evaluate(expr, context);
final output = '<pre>Debug: ${value.toString()}</pre>';
// In a real implementation, this would stop execution
// For now, just return the debug output
return output;
} catch (_) {
return '<pre>Debug: null</pre>';
}
});
}