fix: поправил опечатки в help, добавил обрезку пробелов
This commit is contained in:
@ -30,16 +30,20 @@ def interactve_mode(rulebook: Rulebook):
|
|||||||
elif user_input.startswith("e:"):
|
elif user_input.startswith("e:"):
|
||||||
return
|
return
|
||||||
elif user_input.startswith(":"):
|
elif user_input.startswith(":"):
|
||||||
print(rulebook.transform(user_input[1:]))
|
print(
|
||||||
|
rulebook.transform(
|
||||||
|
user_input[1:].strip(" \t")
|
||||||
|
)
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
print(rulebook.transform(user_input))
|
print(rulebook.transform(user_input.strip(" \t")))
|
||||||
|
|
||||||
def print_help():
|
def print_help():
|
||||||
print("you can type expressions right after prompt. However there is some "
|
print("You can type expressions right after prompt. However there are some "
|
||||||
'reserved chars: "h:" to print help, "v:" to run next expression in '
|
'reserved sequences: "h:" to print help, "v:" to run next expression in '
|
||||||
'verbose mode, "r:" to view rules, "e:" to exit, and ":" to imidiately '
|
'verbose mode, "r:" to view rules, "e:" to exit, and ":" to imidiately '
|
||||||
'start prompt.Can be omited if your prompt doesn\'t start from'
|
'start prompt (can be omitted if your prompt doesn\'t start from '
|
||||||
'reserved sequence. Note that your input after "h:", "e:" and "r:" will '
|
'reserved sequence). Note that your input after "h:", "e:" and "r:" will '
|
||||||
'be ignored')
|
'be ignored')
|
||||||
|
|
||||||
def _print_rules(rules: list[Rule]) -> None:
|
def _print_rules(rules: list[Rule]) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user