task p-4.5
This commit is contained in:
@@ -13,6 +13,10 @@ const TYPO_PATTERNS = [/lable/i, /affter/i, /__+/, /\s{2,}/];
|
||||
const RESERVED_DYNAMIC_FIELD_NAMES = new Set(['topic', 'data_topic']);
|
||||
|
||||
function detectTypo(fieldName: string) {
|
||||
if (fieldName.startsWith('__section_role__')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return TYPO_PATTERNS.some((pattern) => pattern.test(fieldName));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user