Description

It doesn't seem possible to use more then one

attachment:file

when using

#format rst

from HelpOnParsers/ReStructuredText:

#format rst
Here is a link to a page attachment__.

__ attachment:Attachment.zip

but what if i need:

#format rst
Here is a link to file 1__.
Here is a link to file 2__.

__ attachment:file1
__ attachment:file2

moin doesn't support it while rst does.

from anonymous-hyperlinks:

Steps to reproduce

paste the following text into a moin page and into a file, then save the moin page and convert (rst2html) the rst to html from the file:

attachment__
attachment__
attachment__
attachment__
attachment__
attachment__
attachment__

__ attachment:file1
__ attachment:file2
__ attachment:file3
__ attachment:file4
__ attachment:file5
__ attachment:file6
__ attachment:file7

Example

Expected body from moin:

<p><a href="/Page?action=AttachFile&amp;rename=file1">Upload new attachment "file1"</a> </p>
<p><a href="/Page?action=AttachFile&amp;rename=file2">Upload new attachment "file2"</a> </p>
<p><a href="/Page?action=AttachFile&amp;rename=file3">Upload new attachment "file3"</a> </p>
<p><a href="/Page?action=AttachFile&amp;rename=file4">Upload new attachment "file4"</a> </p>
<p><a href="/Page?action=AttachFile&amp;rename=file5">Upload new attachment "file5"</a> </p>
<p><a href="/Page?action=AttachFile&amp;rename=file6">Upload new attachment "file6"</a> </p>
<p><a href="/Page?action=AttachFile&amp;rename=file7">Upload new attachment "file7"</a> </p>

Component selection

Details

MoinMoin Version

1.6

OS and Version

Any

Python Version

Any

Server Setup

Any

Server Details

Any

Language you are using the wiki in (set in the browser/UserPreferences)

Any

Workaround

Discussion

Ideally moin could use rst directive see rst-directives.

In MoinMoin/parser/text_rst.py:

   1 import docutils
   2 from docutils.core import publish_parts
   3 from docutils.writers import html4css1
   4 from docutils.nodes import reference
   5 from docutils.parsers import rst
   6 from docutils.parsers.rst import directives, roles 
   7 
   8 # here the directive: '.. attachment:: file'
   9 directives.register_directive(directive_name, directive_class)

Plan


CategoryMoinMoinBug

MoinMoin: MoinMoinBugs/RstAnonymousHyperlink (last edited 2007-10-29 19:10:43 by localhost)