From 7bd76e877e3055dfb2490158f3bfc3668aaedd55 Mon Sep 17 00:00:00 2001 From: Andrey Vlasovskikh Date: Mon, 3 Feb 2014 13:21:59 +0400 Subject: [PATCH] Reverted percent formatting by default for MySQL parser compatibility with Python (PY-10771) --- .../src/com/jetbrains/python/codeInsight/PyInjectionUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/src/com/jetbrains/python/codeInsight/PyInjectionUtil.java b/python/src/com/jetbrains/python/codeInsight/PyInjectionUtil.java index 6030afc5a158..fe51d6468fd5 100644 --- a/python/src/com/jetbrains/python/codeInsight/PyInjectionUtil.java +++ b/python/src/com/jetbrains/python/codeInsight/PyInjectionUtil.java @@ -81,7 +81,8 @@ public class PyInjectionUtil { */ @NotNull public static InjectionResult registerStringLiteralInjection(@NotNull PsiElement element, @NotNull MultiHostRegistrar registrar) { - return processStringLiteral(element, registrar, "", "", Formatting.NONE); + // Assume percent formatting since the MySQL parser cannot handle Python-style substitutions + return processStringLiteral(element, registrar, "", "", Formatting.PERCENT); } private static boolean isStringLiteralPart(@NotNull PsiElement element, @Nullable PsiElement context) {