Skip to content

Commit b37a9ab

Browse files
authored
Merge a42f051 into 9717b81
2 parents 9717b81 + a42f051 commit b37a9ab

3 files changed

Lines changed: 12 additions & 8 deletions

File tree

source/characterProcessing.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# A part of NonVisual Desktop Access (NVDA)
2-
# Copyright (C) 2010-2023 NV Access Limited, World Light Information Limited,
2+
# Copyright (C) 2010-2024 NV Access Limited, World Light Information Limited,
33
# Hong Kong Blind Union, Babbage B.V., Julien Cochuyt, Cyrille Bougot
44
# This file is covered by the GNU General Public License.
55
# See the file COPYING for more details.
@@ -528,13 +528,7 @@ def __init__(self, locale):
528528
multiChars.sort(key=lambda identifier: len(identifier), reverse=True)
529529

530530
# Build the regexp.
531-
patterns = [
532-
# Strip repeated spaces from the end of the line to stop them from being picked up by repeated.
533-
r"(?P<rstripSpace> +$)",
534-
# Repeated characters: more than 3 repeats.
535-
r"(?P<repeated>(?P<repTmp>%s)(?P=repTmp){3,})" % characters
536-
]
537-
# Complex symbols.
531+
patterns = []# Complex symbols.
538532
# Each complex symbol has its own named group so we know which symbol matched.
539533
patterns.extend(
540534
u"(?P<c{index}>{pattern})".format(index=index, pattern=symbol.pattern)
@@ -546,6 +540,12 @@ def __init__(self, locale):
546540
multiChars="|".join(re.escape(identifier) for identifier in multiChars),
547541
singleChars=characters
548542
))
543+
patterns.extend([
544+
# Strip repeated spaces from the end of the line to stop them from being picked up by repeated.
545+
r"(?P<rstripSpace> +$)",
546+
# Repeated characters: more than 3 repeats.
547+
r"(?P<repeated>(?P<repTmp>%s)(?P=repTmp){3,})" % characters
548+
])
549549
pattern = "|".join(patterns)
550550
try:
551551
self._regexp = re.compile(pattern, re.UNICODE)

source/locale/en/symbols.dic

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ complexSymbols:
1111
# Phrase endings.
1212
; phrase ending (?<=[^\s;]);(?=\s|$)
1313
: phrase ending (?<=[^\s:]):(?=\s|$)
14+
# Series of dots used for visual presentation, e.g. in table of contents
15+
padding . \.{4,}
1416
# Others
1517
decimal point (?<![^\d -])\.(?=\d)
1618
in-word ' (?<=[^\W_])['’]
@@ -25,6 +27,7 @@ symbols:
2527
? sentence ending question all always
2628
; phrase ending semi most always
2729
: phrase ending colon most always
30+
padding . padding dots all always
2831
decimal point none always
2932
in-word ' tick all norep
3033
negative number minus none norep

user_docs/en/changes.t2t

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ What's New in NVDA
2020
- Add-on Store:
2121
- The minimum and the last tested NVDA version for an add-on are now displayed in the "other details" area. (#15776, @Nael-Sayegh)
2222
-
23+
- Padding dots commonly used in tables of contents are not reported anymore at low punctuation levels. (#15845, @CyrilleB79)
2324
-
2425

2526
== Bug Fixes ==

0 commit comments

Comments
 (0)