diff --git a/lib/kernel.py b/lib/kernel.py index d44b394..ed3a53b 100644 --- a/lib/kernel.py +++ b/lib/kernel.py @@ -44,6 +44,7 @@ HELIUM_OBJECT_INSPECT_PANEL = "helium_object_inspect" ANSI_ESCAPE_PATTERN = re.compile(r"\x1b[^m]*m") +DOLLAR_REGEX = re.compile(r"(?" if match["type"] is None else match["type"] ), - match["text"], + escape_dollar_signs(match["text"]), ) for match in recv_content["metadata"]["_jupyter_types_experimental"] ] else: # Just say the completion is came from this plugin, otherwise. return [ - (match + "\tHelium", match) for match in recv_content["matches"] + (match + "\tHelium", escape_dollar_signs(match)) for match in recv_content["matches"] ] except Empty: self._logger.info("Completion timeout.")