StripTrailingSpacesFilter (@Nullable Project project, @NotNull Document document) { Language documentLanguage = PsiBasedStripTrailingSpacesFilter.getDocumentLanguage(document); if (documentLanguage != null && documentLanguage.is(MarkdownLanguage.INSTANCE)) { return StripTrailingSpacesFilter.NOT_ALLOWED; } return StripTrailingSpacesFilter.ALL_LINES; }