On Dec 18, 7:33 pm, shday <
stephen.h....@gmail.com> wrote:
> Hi,
>
> There are several ways to do this, but the following seems to be the
> simplest (not tested):
>
> 1. Change elements.Paragraph.re_string() to something like:
>
> def re_string(self):
> return r'^ *(:?)(.*)\n'
>
> 2. Override the _build method with something like:
>
> def _build(self,mo,element_store):
> if mo.group(1):
> the_class = 'indented'
> else:
> the_class = None
> return bldr.tag.__getattr__(self.tag)(fragmentize(mo.group(2),
> self.child_tags,
> element_store),
> class_=the_class)
>
> Obviously this wouldn't be a great addition to the library (hard coded
> ':' and 'indented') but you get the idea.
>