[PATCH 2 of 6] minimal reStructuredText parser

timeless timeless at gmail.com
Fri Jul 10 07:55:24 CDT 2009


> +- definition lists (must use '  ' to indent definitions)

> +    Returns a list of dictionaries representing the blocks. Each block has a
> +    'indent' field and a 'lines' field.

I'd normally write: an 'indent' field...

> +def findliteralblocks(blocks):
> +    """Finds literal blocks and adds 'type' field to the blocks.

... adds a 'type' field ... ?

> +    Literal blocks are given type 'literal', all other blocks are given type

... are given the type 'literal' ... given the type ... ?

> +    'paragraph'.

> +            # List items are formatted with a hanging indent. We must
> +            # correct for this here when we still have the original

... here while we ...

> +            # information on the indentation of the following literal

... of the subsequent literal ...

> +            # blocks available.

> +            # Mark the following indented blocks.

> +    The blocks must have the 'type' field, i.e., they should have been

Blocks must have a 'type' field ...

> +    The blocks must have the 'type' field, i.e., they should have been

note that I'm not a fan of "have been", it's fairly weak.

> +      for the indention

.. for/to indentation

> +  Another definition. Final line in the

The final line ...

> +There is support for simple options lists,
> +but with long options only:

> +--par      This option has two paragraphs in the description.

... in its description.

> +options formatted in 30 characters:

options formatted to fit in 30 character long lines ?

> +options lists, but with long
> +options only:

but only with long options:


More information about the Mercurial-devel mailing list