Revert "Simplify"

This reverts commit 7ca1a5aee9.
main
Bob Mottram 2021-04-22 18:04:51 +01:00
parent 7ca1a5aee9
commit af2baff093
1 changed files with 8 additions and 4 deletions

View File

@ -138,10 +138,14 @@ def preparePostFromHtmlCache(nickname: str, postHtml: str, boxName: str,
for keyIndex in range(10):
keyStr = 'accesskey="' + str(keyIndex) + '"'
if keyStr in withPageNumber:
withPageNumber = \
withPageNumber.replace(keyStr,
'accesskey="' +
str(accessKeyIndex) + '"')
if accessKeyIndex == 0 or accessKeyIndex > 9:
withPageNumber = \
withPageNumber.replace(keyStr, '')
else:
withPageNumber = \
withPageNumber.replace(keyStr,
'accesskey="' +
str(accessKeyIndex) + '"')
break
return prepareHtmlPostNickname(nickname, withPageNumber)