## page was renamed from MoinMoinBugs/1.9/ReReStructuredText/ParserDirectives
= Description =

## Please read this page. Lines prefixed with ## such as this one are comments,
## you can remove them (except for those after the "Plan" section.)
## Please follow the instructions given in those comments and the text.
## After creating the bug page, please subscribe to it! We may have questions
## that only you can answer, and if you get email when your bug changes it'll
## be much faster to get it fixed since you can answer the questions!

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 ==
## Describe the steps needed to reproduce the bug. If we can't reproduce it, we  probably can't fix it.
 1. Create a new document
 1. Add a `#format rst` line at the top
 1. Start creating the document
 1. Add a `csv` block{{{{
{{{#!csv ,
a,b,c
d,e,f
}}}
    }}}}
 1. Save/preview the document

== Example ==
##Add URL that show the bug, screenshot or test wiki markup that fail...

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
}}}

}}}}

##URL: 

##{{attachment:screenshot.png}}

##{{{
##Example wiki markup that fail
##}}}

== Component selection ==

## Where you think is this bug happening ? (general, plugin [plugin name], theme [theme name], ...

 * general

== Details ==

## If you got a traceback, please save the traceback page as html and attach here:
## [[attachment:traceback.html]]

## if the bug is in this wiki, just kill the table and write: This Wiki.

## If a traceback is not available, please fill in the details here:
|| '''!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 ==
## How to deal with the bug until it is fixed

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 =
## This part is for Moin``Moin developers:

 * Priority: 
 * Assigned to:
 * Status: 

----
## If you are a moin core developer, replace the category to Category* in these cases:
## Category MoinMoinNoBug - if this is not a bug.
## Category MoinMoinBugConfirmed - if you can confirm the bug on current code.
## Category MoinMoinBugFixed - after the bug is fixed in current code.
CategoryMoinMoinBug