diff --git a/reporting/markslider.py b/reporting/markslider.py index eb9ab6b..42b1a5b 100755 --- a/reporting/markslider.py +++ b/reporting/markslider.py @@ -536,20 +536,6 @@ def launch(reader,opts,offset): if s.find("$!")==-1 and s.find("$>")==-1 and len(urls)==0 and len(images)==0: return - if len(urls)>0: - # Remove ) at the end of url: [name](link) markdown syntax - subprocess.call("xdg-open '%s' &"%(urls[0].rstrip(")"),), - stdout=subprocess.PIPE,stderr=subprocess.PIPE, - shell=True) - return - - if len(images)>0: - image = re.sub('.*\(([^\)]+)\).*', "\\1",images[0]) - subprocess.call("xdg-open '%s' &"%(image,), - stdout=subprocess.PIPE,stderr=subprocess.PIPE, - shell=True) - return - run_command=re.match("(.*)\$!(.*)\$!(.*)",s) show_command=re.match("(.*)\$>(.*)\$>(.*)",s) if show_command != None: @@ -571,6 +557,19 @@ def launch(reader,opts,offset): shell=True,executable="/bin/bash") inkey=getch.get() return + # Open URLS last + if len(urls)>0: + # Remove ) at the end of url: [name](link) markdown syntax + subprocess.call("xdg-open '%s' &"%(urls[0].rstrip(")"),), + stdout=subprocess.PIPE,stderr=subprocess.PIPE, + shell=True) + return + if len(images)>0: + image = re.sub('.*\(([^\)]+)\).*', "\\1",images[0]) + subprocess.call("xdg-open '%s' &"%(image,), + stdout=subprocess.PIPE,stderr=subprocess.PIPE, + shell=True) + return return bc=bc() getch=getch()