Skip to content
Permalink
Browse files

txt2tags for python3 #8734 (#9648)

* txt2tags for python3 #8734

* address review comments

Co-Authored-By: Leonard de Ruijter <leonardder@users.noreply.github.com>

* address review comments

* address review comments. revert miscDeps

* address review comment #9648

* Update miscDeps to master containing python3 txt2tags.
  • Loading branch information...
nishimotz authored and michaelDCurran committed Jun 11, 2019
1 parent 89b2744 commit 2e323342702e6c11212f061e4411cb80b3d9a9c2
Showing with 4 additions and 4 deletions.
  1. +4 −4 keyCommandsDoc.py
@@ -3,7 +3,7 @@
#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-2015 NV Access Limited, Mesar Hameed
#Copyright (C) 2010-2019 NV Access Limited, Mesar Hameed, Takuya Nishimoto

"""Utilities related to NVDA Key Commands documents.
"""
@@ -213,7 +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*$")
RE_SETTING_SINGLE_KEY = re.compile(r"^[^|]+?[::]\s*(.+?)\s*$")
def _handleSetting(self):
if not self._settingsHeaderRow:
raise KeyCommandsError("%d, setting command cannot be used before settingsSection command" % self._lineNum)
@@ -237,7 +237,7 @@ def _handleSetting(self):
# The next few lines should be table rows for each layout.
# Alternatively, if the key is common to all layouts, there will be a single line of text specifying the key after a colon.
keys = []
for layout in xrange(self._settingsNumLayouts):
for layout in range(self._settingsNumLayouts):
line = next(self._ug).strip()
self._lineNum += 1
m = self.RE_SETTING_SINGLE_KEY.match(line)
@@ -254,7 +254,7 @@ def _handleSetting(self):
if 1 == len(keys) < self._settingsNumLayouts:
# The key has only been specified once, so it is the same in all layouts.
key = keys[0]
keys[1:] = (key for layout in xrange(self._settingsNumLayouts - 1))
keys[1:] = (key for layout in range(self._settingsNumLayouts - 1))

# There should now be a blank line.
line = next(self._ug).strip()

0 comments on commit 2e32334

Please sign in to comment.
You can’t perform that action at this time.