diff --git a/app/src/main/java/net/bible/service/device/speak/SpeakCommands.kt b/app/src/main/java/net/bible/service/device/speak/SpeakCommands.kt index 322e9b715f..36e9c33acb 100644 --- a/app/src/main/java/net/bible/service/device/speak/SpeakCommands.kt +++ b/app/src/main/java/net/bible/service/device/speak/SpeakCommands.kt @@ -94,9 +94,9 @@ class SpeakCommandArray: ArrayList() { } else { 4000 } - private val endsWithSentenceBreak = Regex(""".*[.?!]+[\p{Pf}"']*\W*""", RegexOption.DOT_MATCHES_ALL) - private val splitIntoTwoSentences = Regex("""(.*)([.?!]+[\p{Pf}"']*)(\W*.+)""", RegexOption.DOT_MATCHES_ALL) - private val startsWithDelimiter = Regex("""([,.?!"':;()]+|'s)(\p{Zs}.*|)""", RegexOption.DOT_MATCHES_ALL) + private val endsWithSentenceBreak = Regex(""".*[.?!。]+[\p{Pf}"']*\W*""", RegexOption.DOT_MATCHES_ALL) + private val splitIntoTwoSentences = Regex("""(.*)([.?!。]+[\p{Pf}"']*)(\W*.+)""", RegexOption.DOT_MATCHES_ALL) + private val startsWithDelimiter = Regex("""([。,.?!"':;(),;]+|'s)(\p{Zs}.*|)""", RegexOption.DOT_MATCHES_ALL) fun copy(): SpeakCommandArray { val cmds = SpeakCommandArray() diff --git a/app/src/main/java/net/bible/service/sword/SwordContentFacade.kt b/app/src/main/java/net/bible/service/sword/SwordContentFacade.kt index 50e1881af0..2d6b31e352 100644 --- a/app/src/main/java/net/bible/service/sword/SwordContentFacade.kt +++ b/app/src/main/java/net/bible/service/sword/SwordContentFacade.kt @@ -219,7 +219,7 @@ object SwordContentFacade { // group 1: before marker """((\d{2,}|\D)""" + // marker itself - """(([.,;:!?]["'\p{Pf}]?\p{Z}+)|(\p{Z}*\p{Pd}\p{Z}*)))"""+ + """(([.,;:!?。,;]["'\p{Pf}]?\p{Z}+)|(\p{Z}*\p{Pd}\p{Z}*)))"""+ // group 6: after marker """(["'¡¿\p{Pi}]?\p{L})""" )