Description
The RST parser fails to create proper conversion of the RST ..figure:: and ..image:: directives. A sting attachment:image.png is created instead of a real attachment link / inline link.
Steps to reproduce
- Create an empty page
Change the formating to RST: #FORMAT rst
Add a ..figure:: Images/image.png directive
- Save changes
The parser renders a string attachment:image.png instead of a link that can be used to upload a figure on the right page (in this case Images)
Example
The following is properly converted to a link:
The following is rendered only as sting:
Component selection
- text_rst.py
Details
MoinMoin Version |
1.6.0 |
OS and Version |
|
Python Version |
|
Server Setup |
|
Server Details |
|
Language you are using the wiki in (set in the browser/UserPreferences) |
|
Workaround
This patch seems to fix the problem for me:
--- MoinMoin/parser/text_rst.py.vanilla 2008-01-26 17:03:25.000000000 +0100 +++ MoinMoin/parser/text_rst.py 2008-01-26 01:52:31.000000000 +0100 @@ -408,7 +408,7 @@ # Attachment doesn't exist, MoinMoin should process it if prefix == '': prefix = 'attachment:' - self.process_wiki_text(prefix + attach_name) + self.process_wiki_text('{{%s%s}}' % (prefix,attach_name)) self.wiki_text = self.fixup_wiki_formatting(self.wiki_text) self.add_wiki_markup() # Attachment exists, get a link to it.
Discussion
Plan
- Priority:
Assigned to: ThomasWaldmann
Status: Thanks for the patch! http://hg.moinmo.in/moin/1.6/rev/60c8ef447310 fixes this and a few related bugs, please test. Note: we still need a RST maintainer, RST parser unit tests, a HelpOnRstSyntax syntax overview/testing page, ...