String (PyStringLiteralExpression leftExpression) { String separator = ""; // detect nontrivial whitespace around the "%" Pair<String, PsiElement> crop = collectWhitespace(leftExpression); String maybeSeparator = crop.getFirst(); if (maybeSeparator != null && !maybeSeparator.isEmpty() && !" ".equals(maybeSeparator)) separator = maybeSeparator; else { // after "%" crop = collectWhitespace(crop.getSecond()); maybeSeparator = crop.getFirst(); if (maybeSeparator != null && !maybeSeparator.isEmpty() && !" ".equals(maybeSeparator)) separator = maybeSeparator; } return separator; }