Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix help.py title parsing
  • Loading branch information
StanFromIreland committed Feb 7, 2025
commit 387804d1af49fd7b2047add8b455af26eb55083d
4 changes: 3 additions & 1 deletion Lib/idlelib/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ def handle_data(self, data):
d = data if self.pre else data.replace('\n', ' ')
if self.tags == 'h1':
try:
self.hprefix = d[0:d.index(' ')]
self.hprefix = d[:d.index(' ')]
if not self.hprefix.isdigit():
self.hprefix = ''
except ValueError:
self.hprefix = ''
if self.tags in ['h1', 'h2', 'h3']:
Expand Down