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 2 commits into from Dec 1, 2014


None yet
2 participants
Copy link

bergey commented Dec 1, 2014

A couple of additions to the RST reader, and associated tests, per discussion!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.

bergey added some commits Dec 1, 2014

parse RST quoted literal blocks
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.
parse RST class directives
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.

This comment has been minimized.

Copy link

jgm commented Dec 1, 2014

Thanks, looks good!

jgm added a commit that referenced this pull request Dec 1, 2014

Merge pull request #1781 from bergey/rst
parse RST quoted literal blocks and class directives

@jgm jgm merged commit 704cfc1 into jgm:master Dec 1, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed

@bergey bergey referenced this pull request Dec 20, 2014


New builder #1

12 of 17 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment