def flushCurrentEntry():
global currentEntry, autoFlushTimer
if autoFlushTimer is not None:
autoFlushTimer.Stop()
autoFlushTimer = None
start, text = currentEntry
text = text.replace("\r\n", "\n")
text = text.replace("\r", "\n")
while True:
i = text.find("\n")
if i == -1:
break
if i > 0:
speech.speakText(text[:i])
if text[i:i + 2] == "\n\n":
speech.speakText("new paragraph")
text = text[i + 2:]
else:
speech.speakText("new line")
text = text[i + 1:]
if text != "":
speech.speakText(text)
braille.handler.handleCaretMove(api.getFocusObject())
currentEntry = None
requestWSRShowHideEvents()
评论列表
文章目录