Merge pull request #1466 from wxWidgets/fix-issue1458

Tweak 3.x versions in the docs to 4.x, to adjust for the difference in version numbers
This commit is contained in:
Robin Dunn
2019-12-20 19:57:55 -08:00
committed by GitHub

View File

@@ -1042,7 +1042,7 @@ class Section(Node):
text = Node.Join(self, with_tail=False)
if not text.strip() or len(text.strip()) < 3:
# Empy text or just trailing commas
# Empty text or just trailing commas
return ''
if self.is_overload and self.share_docstrings:
@@ -1065,6 +1065,12 @@ class Section(Node):
version = version[0:-1]
text = '%s\n%s%s'%(version, sub_spacer, text)
# Show both the wxPython and the wxWidgets version numbers for
# versions >= 3. That's not entirely accurate, but close enough.
if text.startswith('3.'):
wx_ver = text[:5]
text = '4.{}/wxWidgets-{} {}'.format(wx_ver[2], wx_ver, text[5:])
elif section_type == 'deprecated':
# Special treatment for deprecated, wxWidgets devs do not put the version number
text = '\n%s%s'%(sub_spacer, text.lstrip('Deprecated'))