diff --git a/wiki-lenny/share/formatter.text_html.py b/wiki-lenny/share/formatter.text_html.py index 883f2129..9c3d31c9 100644 --- a/wiki-lenny/share/formatter.text_html.py +++ b/wiki-lenny/share/formatter.text_html.py @@ -15,6 +15,10 @@ from MoinMoin import wikiutil, i18n from MoinMoin.Page import Page from MoinMoin.action import AttachFile from MoinMoin.support.python_compatibility import set, rsplit +### HACK SAUVAGE +import urllib +### FIN HACK + # insert IDs into output wherever they occur # warning: breaks toggle line numbers javascript @@ -1001,32 +1005,54 @@ document.write('
-
| ''' % (pic0, tit0, bod0) ]
+
+ fname= urllib.url2pathname(pic0.split('=')[-1])
+ if AttachFile.exists(self.request, self.page.page_name, fname):
+ html += [ format_pe % (pic0, tit0, bod0) ]
+ else:
+ html += [ format_pne % (pic0, pic0.split('=')[-1], tit0, bod0) ]
if len(entries) >= 2:
pic1, tit1, bod1 = entries[1]
entries = entries[2:]
- html += [ '''
-
-
|