Skip to content

Commit

Permalink
txt2tags for python3 nvaccess#8734
Browse files Browse the repository at this point in the history
commit befffdd
Author: Takuya Nishimoto <nishimotz@gmail.com>
Date:   Fri May 31 22:35:55 2019 +0900

    address review comments. revert miscDeps

commit 3070fcc
Author: Takuya Nishimoto <nishimotz@gmail.com>
Date:   Fri May 31 22:32:13 2019 +0900

    address review comments

commit e32fa0e
Author: Takuya Nishimoto <nishimotz@gmail.com>
Date:   Fri May 31 22:27:26 2019 +0900

    address review comments

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

commit adcfdea
Author: Takuya Nishimoto <nishimotz@gmail.com>
Date:   Fri May 31 17:34:24 2019 +0900

    txt2tags for python3 nvaccess#8734
  • Loading branch information
Leonard de Ruijter committed Jun 4, 2019
1 parent 92a8493 commit aacf222
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions keyCommandsDoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
#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
#Copyright (C) 2018-2019 Takuya Nishimoto

"""Utilities related to NVDA Key Commands documents.
"""
Expand Down Expand Up @@ -213,7 +214,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)
Expand All @@ -237,7 +238,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)
Expand All @@ -254,7 +255,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()
Expand Down
2 changes: 1 addition & 1 deletion miscDeps
Submodule miscDeps updated 366 files

0 comments on commit aacf222

Please sign in to comment.