Adds path checking to the multiline url heuristic
This commit is contained in:
parent
4500bc24d4
commit
006d8760c4
@ -821,7 +821,8 @@ class CommandDispatcher:
|
|||||||
log.misc.debug("{} contained: '{}'".format(target,
|
log.misc.debug("{} contained: '{}'".format(target,
|
||||||
text.replace('\n', '\\n')))
|
text.replace('\n', '\\n')))
|
||||||
text_urls = [u for u in text.split('\n') if u.strip()]
|
text_urls = [u for u in text.split('\n') if u.strip()]
|
||||||
if len(text_urls) > 1 and not urlutils.is_url(text_urls[0]):
|
if len(text_urls) > 1 and not urlutils.is_url(text_urls[0]) \
|
||||||
|
and urlutils.get_path_if_valid(text_urls[0], check_exists = True) is None:
|
||||||
text_urls = [text]
|
text_urls = [text]
|
||||||
for i, text_url in enumerate(text_urls):
|
for i, text_url in enumerate(text_urls):
|
||||||
if not window and i > 0:
|
if not window and i > 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user