Replace DetectSyntax with ApplySyntax