mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 06:36:24 +00:00
...
This commit is contained in:
parent
10d359c222
commit
86a8b231f4
1 changed files with 2 additions and 2 deletions
|
|
@ -96,8 +96,8 @@ def to_cmdline(x: str) -> List[str]:
|
|||
|
||||
|
||||
def python_string(text: str) -> str:
|
||||
import ast
|
||||
ans: str = ast.literal_eval("'''" + text.replace("'''", "'\\''") + "'''")
|
||||
from ast import literal_eval
|
||||
ans: str = literal_eval("'''" + text.replace("'''", "'\\''") + "'''")
|
||||
return ans
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue