Tokenizer (PsiElement element) { if (element instanceof PyStringLiteralExpression) { final InjectedLanguageManager injectionManager = InjectedLanguageManager.getInstance(element.getProject()); if (element.getTextLength() >= 2 && injectionManager.getInjectedPsiFiles(element) != null) { return EMPTY_TOKENIZER; } PsiElement parent = element.getParent(); if (parent instanceof PyBinaryExpression binaryExpression) { if (element == binaryExpression.getLeftExpression() && binaryExpression.getOperator() == PyTokenTypes.PERC) { return myFormatStringTokenizer; } } return myStringLiteralTokenizer; } return super.getTokenizer(element); }