Changeset 287
- Timestamp:
- 07/25/11 11:39:56 (22 months ago)
- Location:
- branches/mbutscher/work/extensions
- Files:
-
- 2 modified
-
HtmlExporter.py (modified) (2 diffs)
-
wikidPadParser/WikidPadParser.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/mbutscher/work/extensions/HtmlExporter.py
r279 r287 1372 1372 self.astNodeStack.append(astNode) 1373 1373 1374 self.outAppend(u'<table border="2">\n') 1375 1374 # Retrieve table appendix values 1375 cssClass = u"" 1376 tableModeAppendix = astNode.findFlatByName("tableModeAppendix") 1377 if tableModeAppendix: 1378 # Written this way to keep compatible if user's own parser wasn't 1379 # updated properly 1380 style = getattr(tableModeAppendix, "cssClass", u"") 1381 if style: 1382 cssClass = u' class="{0}"'.format(style) 1383 1384 self.outAppend(u'<table border="2"{0}>\n'.format(cssClass)) 1385 1376 1386 for row in astNode.iterFlatByName("tableRow"): 1377 1387 self.outAppend(u"<tr>") … … 1381 1391 self.outAppend(u"</td>") 1382 1392 self.outAppend(u"</tr>\n") 1383 1393 1384 1394 if self.asIntHtmlPreview: 1385 1395 self.outAppend(u'</table>\n<br />\n') # , eatPostBreak=not self.asIntHtmlPreview) -
branches/mbutscher/work/extensions/wikidPadParser/WikidPadParser.py
r279 r287 3 3 4 4 # Official parser plugin for wiki language "WikidPad default 2.0" 5 # Last modified (format YYYY-MM-DD): 2011-0 6-265 # Last modified (format YYYY-MM-DD): 2011-07-21 6 6 7 7 … … 495 495 496 496 def actionTableModeAppendix(s, l, st, t): 497 st.dictStack.getNamedDict("table")["table.tabSeparated"] = False 498 t.cssClass = None 497 499 for key, data in t.entries: 498 500 if key == "t": 499 501 st.dictStack.getNamedDict("table")["table.tabSeparated"] = True 500 return 501 502 st.dictStack.getNamedDict("table")["table.tabSeparated"] = False 502 # Styles are designated by "s=". They will result in the css class 503 # s being applied to all table elements. E. g. "s=foo" uses class 504 # "foo". The '=' can be omitted, therefore "sfoo" does the same. 505 elif key == "s": 506 if data.startswith(u"="): 507 data = data[1:] 508 t.cssClass = data 503 509 504 510
