mpastell/Pweave — pull request #9 by aaren (2013-08-18 12:34:40+00:00)
Title: Restructure to allow arbitrary regex for code block matching.

95d7c72 - I've written a simple integration test to check that pweave still functions. I run this with nosetests.

cf0624c - This leaves the behaviour of Pweave unchanged, but restructures the PWebReader class to allow extension to arbitrary patterns to recognise the start of code and doc chunks.

For example, in [knitr](http://yihui.name/knitr/patterns) all patterns are stored in a single place. I think this is easier to understand and ultimately more flexible, as Pweave could be used with input written for knitr but with python instead of r.

I haven't gone further and make a pattern container yet, but it would be easy to do.

It is still possible to write an arbitrary PWebReader where the chunk start recognition is defined in the `self.codestart` and `self.docstart` methods, just like in PWebNBReader.

This change required being more careful with " and ' in code options. These are all explicitly stripped out before the options are parsed.