Update marked_text.py

This commit is contained in:
chrys87 2016-08-24 16:17:42 +02:00 committed by GitHub
parent f440e31f54
commit aa8f4d563e

View File

@ -9,9 +9,15 @@ class command():
(environment['commandBuffer']['Marks']['2'] == None):
environment['runtime']['outputManager'].presentText(environment, "two marks needed", interrupt=True)
return environment
marked = mark_utils.getTextBetweenMarks(environment['commandBuffer']['Marks']['1'], environment['commandBuffer']['Marks']['2'], environment['screenData']['newContentText'].split('\n'))
print(marked)
# use the last first and the last setted mark as range
startMark = environment['commandBuffer']['Marks']['1'].copy()
endMark = environment['commandBuffer']['Marks']['2'].copy()
if environment['commandBuffer']['Marks']['3'] != None:
endMark = environment['commandBuffer']['Marks']['3'].copy()
marked = mark_utils.getTextBetweenMarks(startMark, endMark, environment['screenData']['newContentText'].split('\n'))
if marked.strip(" \t\n") == '':
environment['runtime']['outputManager'].presentText(environment, "blank", soundIcon='EmptyLine', interrupt=True)
else: