Skip to content

Commit ed66737

Browse files
committed
Fix missing escape
1 parent 567547b commit ed66737

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Language/PureScript/Ide/Imports/Actions.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import Language.PureScript.Ide.Completion (getExactMatches)
2323
import Language.PureScript.Ide.Error (IdeError(..))
2424
import Language.PureScript.Ide.Filter (Filter)
2525
import Language.PureScript.Ide.Imports (Import(..), parseImportsFromFile', prettyPrintImportSection)
26-
import Language.PureScript.Ide.State (getAllModules, runQuery)
26+
import Language.PureScript.Ide.State (getAllModules, runQuery, escapeSQL)
2727
import Language.PureScript.Ide.Prim (idePrimDeclarations)
2828
import Language.PureScript.Ide.Types (Ide, IdeDeclaration(..), IdeType(..), Match(..), Success(..), _IdeDeclModule, ideDtorName, ideDtorTypeName, ideTCName, ideTypeName, ideTypeOpName, ideValueOpName, toText)
2929
import Language.PureScript.Ide.Util (discardAnn, identifierFromIdeDeclaration)
@@ -180,8 +180,8 @@ addImportForIdentifier fp ident qual filters' = do
180180
mapMaybe (\case
181181
F.Filter (Left modules) ->
182182
Just $ "module_name in (" <> T.intercalate "," (toList modules <&> runModuleName <&> \m -> "'" <> m <> "'") <> ")"
183-
F.Filter (Right (F.Prefix f)) -> Just $ "name glob '" <> f <> "*'"
184-
F.Filter (Right (F.Exact f)) -> Just $ "name glob '" <> f <> "'"
183+
F.Filter (Right (F.Prefix f)) -> Just $ "name glob '" <> escapeSQL f <> "*'"
184+
F.Filter (Right (F.Exact f)) -> Just $ "name glob '" <> escapeSQL f <> "'"
185185
F.Filter (Right (F.Namespace namespaces)) ->
186186
Just $ "namespace in (" <> T.intercalate "," (toList namespaces <&> \n -> "'" <> toText n <> "'") <> ")"
187187
F.Filter (Right (F.DeclType dt)) ->

0 commit comments

Comments
 (0)