annotate data/plugin/macro/MiniPage.py @ 653:127da830be6c

updated copyright
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Tue, 19 Apr 2016 16:29:54 +0200
parents d6a7c36f06f5
children
rev   line source
582
a6e3bc3c144e macro.MiniPage: renders markup inside other markup, e.g. a bulletlist or headings inside of a table
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
1 # -*- coding: iso-8859-1 -*-
a6e3bc3c144e macro.MiniPage: renders markup inside other markup, e.g. a bulletlist or headings inside of a table
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
2 """
a6e3bc3c144e macro.MiniPage: renders markup inside other markup, e.g. a bulletlist or headings inside of a table
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
3 MoinMoin - MiniPage Macro
a6e3bc3c144e macro.MiniPage: renders markup inside other markup, e.g. a bulletlist or headings inside of a table
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
4
a6e3bc3c144e macro.MiniPage: renders markup inside other markup, e.g. a bulletlist or headings inside of a table
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
5 This macro is used to write multi line markup into a table.
a6e3bc3c144e macro.MiniPage: renders markup inside other markup, e.g. a bulletlist or headings inside of a table
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
6 Add a linefeed for a new line e.g.
585
d6a7c36f06f5 macro.MiniPage: doc string macro example changed to new syntax
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 582
diff changeset
7 ||Buttons ||<<MiniPage( * Redo\n * Undo)>><<MiniPage( * Quit)>>||
d6a7c36f06f5 macro.MiniPage: doc string macro example changed to new syntax
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 582
diff changeset
8 ||Section ||<<MiniPage(= heading 1 =)>><<MiniPage(== heading 2 ==)>>||
582
a6e3bc3c144e macro.MiniPage: renders markup inside other markup, e.g. a bulletlist or headings inside of a table
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
9
653
127da830be6c updated copyright
Reimar Bauer <rb.proj AT googlemail DOT com>
parents: 585
diff changeset
10 @copyright: 2005-2016 by MoinMoin:ReimarBauer
582
a6e3bc3c144e macro.MiniPage: renders markup inside other markup, e.g. a bulletlist or headings inside of a table
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
11 @license: GNU GPL, see COPYING for details.
a6e3bc3c144e macro.MiniPage: renders markup inside other markup, e.g. a bulletlist or headings inside of a table
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
12 """
a6e3bc3c144e macro.MiniPage: renders markup inside other markup, e.g. a bulletlist or headings inside of a table
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
13 from MoinMoin import wikiutil
a6e3bc3c144e macro.MiniPage: renders markup inside other markup, e.g. a bulletlist or headings inside of a table
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
14
a6e3bc3c144e macro.MiniPage: renders markup inside other markup, e.g. a bulletlist or headings inside of a table
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
15 def execute(macro, text):
a6e3bc3c144e macro.MiniPage: renders markup inside other markup, e.g. a bulletlist or headings inside of a table
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
16 request = macro.request
a6e3bc3c144e macro.MiniPage: renders markup inside other markup, e.g. a bulletlist or headings inside of a table
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
17 text = ''.join(text)
a6e3bc3c144e macro.MiniPage: renders markup inside other markup, e.g. a bulletlist or headings inside of a table
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
18 text = text.replace('\\n', '\n')
a6e3bc3c144e macro.MiniPage: renders markup inside other markup, e.g. a bulletlist or headings inside of a table
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
19 Parser = wikiutil.searchAndImportPlugin(request.cfg, "parser", request.page.pi['format'])
a6e3bc3c144e macro.MiniPage: renders markup inside other markup, e.g. a bulletlist or headings inside of a table
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
20 return wikiutil.renderText(request, Parser, text)
a6e3bc3c144e macro.MiniPage: renders markup inside other markup, e.g. a bulletlist or headings inside of a table
Reimar Bauer <rb.proj AT googlemail DOT com>
parents:
diff changeset
21