[PATCH 2 of 3] help: modify config.txt to make minirst find sections correctly (issue2804)
mg at lazybytes.net
Mon May 30 03:10:45 CDT 2011
yun lee <yun.lee.bj at gmail.com> writes:
> It's necessary to make the change in this patch to make minirst find
> sections correctly .
I've pushed this patch but applied it to doc/config.txt.
I made the commit message a little bigger by including the paragraph you
wrote above so that it now describes *why* this change is needed. Please
don't send such explanations as additional emails -- include them in the
commit message instead :-)
I removed the reference to Issue2804 since this is just a step on the
way and not really a fix for that issue.
> diff -r be66dc433d4b mercurial/minirst.py
> --- a/mercurial/minirst.py Sat May 28 12:39:26 2011 +0800
> +++ b/mercurial/minirst.py Sat May 28 19:48:04 2011 +0800
> @@ -442,6 +442,13 @@
> blocks = findliteralblocks(blocks)
> blocks, pruned = prunecontainers(blocks, keep or )
> blocks = findsections(blocks)
> + f = open('blocks.txt', 'w')
> + content = '\n'.join(str(b) for b in blocks)
> + f.write(content)
> + f.close()
> blocks = inlineliterals(blocks)
> blocks = hgrole(blocks)
> blocks = splitparagraphs(blocks)
If you look 30 lines further below in minirst.py, then you'll see that
it can be run as a script on the command line and that it will then
print lots of debug information, including the exact block structure.
Mercurial links: http://mercurial.ch/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the Mercurial-devel