Description

When using ReST as page format (or inside a {{{#!rst ... }}} block) it is not possible to embed another parser block.

For example, I am using GraphViz quite often. Currently, it's not possible to add a GraphVizForMoin block into a document using the #format rst directive. One is forced to use a #!rst block, and close it before opening the #!GraphViz block.

This has an important consequence: One of the nicer features of ReST is that you can defer the link targets to the end of the document (other features are similar. For example footnotes). This makes the document source so much easier to read. And also maintainable as you can use the same link multiple times while only writing the link target once! Unfortunately, when writing the links in this fashion, one is forced to define the links at the end of the block instead of the end of the document. For me, this defeats the main purpose of why I would like to use ReST: Source readability.

Rationale: I intend to use rst as default page parser. However, this and FeatureRequests/ReStructuredText/Categories refrain me from doing so. I would like to make it as easy as possible to edit pages for my users, and I find rst to be so far the cleanest plain-text-syntax. Mixing parser directives to achieve the most basic tasks is complicating things unnecessarily.

Also, I am certain, that there are other very interesting parsers that cannot be used because of this (f.ex.: csv)

Note that one of the biggest features in wikis is code readability. Especially for larger documents. If the source becomes hard to read, it discourages people to contribute. Which is a huge advantage when using ReST, as it really stays clean and readable!

Steps to reproduce

  1. Create a new document
  2. Add a #format rst line at the top

  3. Start creating the document
  4. Add a csv block

    {{{#!csv ,
    a,b,c
    d,e,f
    }}}
  5. Save/preview the document

Example

Example document:

#format rst

Example Document
================

The following block should render as a HTML Table (But at the time of this writing, it does not):

{{{#!csv ,
a,b,c
d,e,f
}}}

Component selection

Details

MoinMoin Version

1.9.3

OS and Version

Ubuntu 10.4 LTS

Python Version

2.6.5 (with docutils 0.9)

Server Setup

moin installed in a virtualenv, using mod_wsgi for deployment

Server Details

nothing special to note

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

English

Workaround

Currently it's impossible to embed other parsers into the ReST parser. In corner-cases it's possible to simply use {{{#!rst ... }}} blocks. But this easily makes the document source a mess to look at and you are better off not using the rst parser. Use at your own discretion.

Discussion

Plan


CategoryMoinMoinBug

MoinMoin: MoinMoinBugs/1.9/ReStructuredText/ParserDirectives (last edited 2011-12-29 10:07:11 by MichelAlbert)