[orca] Adjust the ellipsis regex



commit 496f8f47d2b3a55eac2d5a984298d358e7678d36
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Sat Nov 28 11:20:10 2015 -0500

    Adjust the ellipsis regex
    
    * Don't swallow the previous char
    * Treat more than 3-4 dots in a row as a non-ellipsis

 src/orca/speechdispatcherfactory.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/speechdispatcherfactory.py b/src/orca/speechdispatcherfactory.py
index a0025a6..524d357 100644
--- a/src/orca/speechdispatcherfactory.py
+++ b/src/orca/speechdispatcherfactory.py
@@ -63,7 +63,7 @@ else:
         _speechd_version_ok = True
 
 PUNCTUATION = re.compile('[^\w\s]', re.UNICODE)
-ELLIPSIS = re.compile('(\342\200\246|[^\.]\.{3,4}(\s|\Z))')
+ELLIPSIS = re.compile('(\342\200\246|(?<!\.)\.{3,4}(?=(\s|\Z)))')
 
 class SpeechServer(speechserver.SpeechServer):
     # See the parent class for documentation.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]