Permalink
Browse files

In the User Guide, when a %kc:setting command is used for a setting w…

…hich has a common key for all layouts, the key may now be placed after a full-width colon (:) as well as the regular colon (:).

Fixes #5739.
  • Loading branch information...
1 parent a301983 commit 644972d16f94dda13146338e34743f22251aa8c0 @jcsteh jcsteh committed Mar 30, 2016
Showing with 7 additions and 3 deletions.
  1. +6 −3 keyCommandsDoc.py
  2. +1 −0 user_docs/en/changes.t2t
View
@@ -1,8 +1,9 @@
+# -*- coding: UTF-8 -*-
#keyCommandsDoc.py
#A part of NonVisual Desktop Access (NVDA)
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
-#Copyright (C) 2010 James Teh <jamie@jantrid.net>
+#Copyright (C) 2010-2015 NV Access Limited, Mesar Hameed
"""Utilities related to NVDA Key Commands documents.
"""
@@ -212,6 +213,7 @@ def _heading(self, m):
self._headings.append(m)
self._kcLastHeadingLevel = min(self._kcLastHeadingLevel, level - 1)
+ RE_SETTING_SINGLE_KEY = re.compile(ur"^[^|]+?[::]\s*(.+?)\s*$")
def _handleSetting(self):
if not self._settingsHeaderRow:
raise KeyCommandsError("%d, setting command cannot be used before settingsSection command" % self._lineNum)
@@ -238,8 +240,9 @@ def _handleSetting(self):
for layout in xrange(self._settingsNumLayouts):
line = next(self._ug).strip()
self._lineNum += 1
- if ":" in line:
- keys.append(line.split(":", 1)[1].strip())
+ m = self.RE_SETTING_SINGLE_KEY.match(line)
+ if m:
+ keys.append(m.group(1))
break
elif not self.t2tRe["table"].match(line):
raise KeyCommandsError("%d, setting command: There must be one table row for each keyboard layout" % self._lineNum)
@@ -23,6 +23,7 @@
== Changes for Developers ==
- NVDA's C++ components are now built with Microsoft Visual Studio 2015. (#5592)
- You can now present a text or HTML message to the user in browse mode using ui.browseableMessage. (#4908)
+- In the User Guide, when a %kc:setting command is used for a setting which has a common key for all layouts, the key may now be placed after a full-width colon (:) as well as the regular colon (:). (#5739)
= 2016.1 =

0 comments on commit 644972d

Please sign in to comment.