Attachment 'minipage.py'
Download 1 # -*- coding: iso-8859-1 -*-
2 """
3 MoinMoin - MiniPage Macro
4
5 PURPOSE:
6 This macro is used to get the possibility to write inside a wiki table normal wiki code.
7 This code is parsed by the wiki parser and is then displayed.
8
9 CALLING SEQUENCE:
10 [[MiniPage(wikicode)]]
11
12 INPUTS:
13 wikicode: e.g. * item1
14 EXAMPLE:
15 ||Buttons ||[[MiniPage( * Redo\n * Undo)]][[MiniPage( * Quit)]]||
16 ||Section ||[[MiniPage(= heading 1 =)]][[MiniPage(== heading 2 ==)]]||
17
18 PROCEDURE:
19 The \n mark is used for a line break.
20
21 Please remove the Version number from the code!
22
23 MODIFICATION HISTORY:
24 Version 1.3.3.-1
25 Version 1.3.3.-2 Updated for Moin1.6
26 Version 1.6.0.-3 refactored
27 @copyright: 2005-2007 by Reimar Bauer (R.Bauer@fz-juelich.de)
28 @license: GNU GPL, see COPYING for details.
29
30 """
31 from MoinMoin import wikiutil
32 import string
33
34 def execute(macro, text):
35 request = macro.request
36 text = ''.join(text)
37 # XXX FIXME line break correctly used here or just a workaround?
38 text = string.replace(text, '\\n', '\n \n')
39 Parser = wikiutil.getParser(request, text)
40 # XXX FIXME parser injects unwanted opening (closing missing!)
41 # of paragraph <p class="line862">
42 return wikiutil.renderText(request, Parser, text, line_anchors=False).replace('<p class="line862">', '')
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.