fix: rst syntax error

This commit is contained in:
Noortheen Raja 2020-11-26 09:30:35 +05:30
parent 6c22578d87
commit e49715ac7d
2 changed files with 6 additions and 6 deletions

View file

@ -1,9 +1,9 @@
**Added:**
* support PTK's clipboard integration if pyperclip is installed.
So that some common emacs like
`cut/copy <https://github.com/prompt-toolkit/python-prompt-toolkit/blob/master/examples/prompts/system-clipboard-integration.py>`_
will work out of the box.
So that some common emacs like
`cut/copy <https://github.com/prompt-toolkit/python-prompt-toolkit/blob/master/examples/prompts/system-clipboard-integration.py>`_
will work out of the box.
**Changed:**

View file

@ -38,9 +38,9 @@ from prompt_toolkit.styles.pygments import pygments_token_to_classname
try:
from prompt_toolkit.clipboard.pyperclip import PyperclipClipboard
SYS_CLIPBOARD = True
HAVE_SYS_CLIPBOARD = True
except ImportError:
SYS_CLIPBOARD = False
HAVE_SYS_CLIPBOARD = False
ANSI_OSC_PATTERN = re.compile("\x1b].*?\007")
CAPITAL_PATTERN = re.compile(r"([a-z])([A-Z])")
@ -154,7 +154,7 @@ class PromptToolkitShell(BaseShell):
self.history = ThreadedHistory(PromptToolkitHistory())
ptk_args = {"history": self.history}
if SYS_CLIPBOARD:
if HAVE_SYS_CLIPBOARD:
ptk_args["clipboard"] = PyperclipClipboard()
self.prompter = PromptSession(**ptk_args)