Comment #10 on issue 1495 by dataku...@gmail.com: Add plain text syntax support into ReST parser
http://code.google.com/p/robotframework/issues/detail?id=1495

I could not find any usable hooks from Docutils for this.

As much as I wanted to avoid defining custom directives, an overriding custom CodeBlock-directive seems to be the best way to go forward. Docutils has a feature for registering custom directives so that they will have precedence over built-in directives (so, it's not completely evil thing to do).

A custom CodeBlock would inherit the original CodeBlock, call its run-method, keep count of found .. code:: robotframework -directives and catch possible "Pygments not found" exceptions. It would solve both the performance issues and the issue of dependency on Pygments. (A custom directive could just strip the "language" argument from directive when Pygment was not found and re-run itself without any problems.)

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--

--- You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to robotframework-commit+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to