From fe246ce01c4c523b7391d58d910af09bf3bac6e6 Mon Sep 17 00:00:00 2001 From: Merijn Verstraaten Date: Sat, 15 Feb 2014 17:51:33 +0100 Subject: Enhanced Pandoc's support for rST roles. rST parser now supports: - All built-in rST roles - New role definition - Role inheritance Issues/TODO: - Silently ignores illegal fields on roles - Silently drops class annotations for roles - Only supports :format: fields with a single format for :raw: roles, requires a change to Text.Pandoc.Definition.Format to support multiple formats. - Allows direct use of :raw: role, rST only allows indirect (i.e., inherited use of :raw:). --- tests/rst-reader.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'tests/rst-reader.rst') diff --git a/tests/rst-reader.rst b/tests/rst-reader.rst index 748bfe0a5..930bf2ed2 100644 --- a/tests/rst-reader.rst +++ b/tests/rst-reader.rst @@ -599,6 +599,30 @@ Reset default-role to the default default. And now `some-invalid-string-3231231` is nonsense. +.. role:: html(raw) + :format: html + +And now with :html:`inline HTML`. + +.. role:: haskell(code) + :language: haskell + +And some inline haskell :haskell:`fmap id [1,2..10]`. + +.. role:: indirect(code) + +.. role:: python(indirect) + :language: python + +Indirect python role :python:`[x*x for x in [1,2,3,4,5]]`. + +.. role:: different-indirect(code) + :language: c + +.. role:: c(different-indirect) + +Different indirect C :c:`int x = 15;`. + Literal symbols --------------- -- cgit v1.2.3