Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse RST quoted literal blocks and class directives #1781

Merged
merged 2 commits into from
Dec 1, 2014
Merged

parse RST quoted literal blocks and class directives #1781

merged 2 commits into from
Dec 1, 2014

Conversation

bergey
Copy link
Contributor

@bergey bergey commented Dec 1, 2014

A couple of additions to the RST reader, and associated tests, per discussion https://groups.google.com/forum/#!searchin/pandoc-discuss/class/pandoc-discuss/q1ELmf2et9o/MH75rcf_VrIJ.

The note about how this is different from the rst2xml output should probably go in the docs somewhere, but I'm not sure where.

closes #65
RST quoted literal blocks are the same as indented literal blocks (which
pandoc already supports) except that the quote character is preserved in
each line.

This includes test cases for the quoted literal block, as well as
additional tests for line blocks and indented literal blocks, to verify
that these are unaffected by the changes.
The class directive accepts one or more class names, and creates a Div
value with those classes.  If the directive has an indented body, the
body is parsed as the children of the Div.  If not, the first block
folowing the directive is made a child of the Div.

This differs from the behavior of rst2xml, which does not create a Div
element.  Instead, the specified classes are applied to each child of
the directive.  However, most Pandoc Block constructors to not take an
Attr argument, so we can't duplicate this behavior.
@jgm
Copy link
Owner

jgm commented Dec 1, 2014

Thanks, looks good!

jgm added a commit that referenced this pull request Dec 1, 2014
parse RST quoted literal blocks and class directives
@jgm jgm merged commit 704cfc1 into jgm:master Dec 1, 2014
@bergey bergey mentioned this pull request Dec 20, 2014
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants