#1039: Remove all leading $ not just one

This commit is contained in:
theslimshaney
2020-02-08 04:37:19 -08:00
committed by Pablo Santiago Blum de Aguiar
parent 7f97818663
commit 9201ce79cf
2 changed files with 14 additions and 3 deletions
+3 -2
View File
@@ -1,4 +1,5 @@
"""Fixes error for commands containing the shell prompt symbol '$'.
"""Fixes error for commands containing one or more occurrences of the shell
prompt symbol '$'.
This usually happens when commands are copied from documentations
including them in their code blocks.
@@ -19,4 +20,4 @@ def match(command):
def get_new_command(command):
return command.script.replace("$", "", 1).strip()
return command.script.lstrip("$ ")