Phoenix docs: handle funny-formatted heading sections for window styles, extra styles and event handling; Add missing modules in the main.html Sphinx file; Convert some more snippets, specifying the highlight language used (XML/HTML for some snippets in wx.html); Correctly reference classes and functions in wx.Bitmap pure-Python methods.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Andrea Gavana
2012-11-30 20:54:13 +00:00
parent 3ca003508a
commit 604b778a2c
11 changed files with 71 additions and 40 deletions

View File

@@ -214,9 +214,14 @@ def ReplaceCppItems(line):
item = 'float'
if len(item.replace('``', '')) > 2:
# Avoid replacing standalone '&&' and similar
for cpp in CPP_ITEMS[0:2]:
item = item.replace(cpp, '')
if '*' in item:
try:
eval(item)
item = item.replace('*', 'x')
except:
# Avoid replacing standalone '&&' and similar
for cpp in CPP_ITEMS[0:2]:
item = item.replace(cpp, '')
newstr.append(item)
@@ -282,6 +287,9 @@ def PythonizeType(ptype):
if 'Image.' in ptype:
ptype = ptype.split('.')[-1]
if ptype.endswith('&'):
ptype = ':class:`%s`'%ptype[0:-1]
return ptype
@@ -354,6 +362,7 @@ def ConvertToPython(text):
if '``' not in newword and '()' not in word and '**' not in word:
word = word.replace(newword, "``%s``"%newword)
word = word.replace('->', '.')
newline.append(word)
newline = spacer + ''.join(newline)