1 Nov 2004 04:01
Re: Re: Transitions
David Goodger <goodger <at> python.org>
2004-11-01 03:01:06 GMT
2004-11-01 03:01:06 GMT
[Felix Wiemann]
> I think I was confused by the name "FinalChecks". Should it be
> renamed to "Final", or "FinalTransforms"?
I don't see a problem with the name. It is a transform, but it
doesn't need to have the word "Transform" in its name; most don't.
And it does final checks.
[David Goodger]
>> Several transition tests will have to be moved to
>> test_transforms, but that's not a big deal.
>
> I just activated transforms for test_transitions.py (with
> ParserTransformTestCase), so we don't need to move things.
I don't like that, because that makes
test/test_parser/test_rst/test_transitions.py test more than just the
parser; it now tests a transform too. In fact, more than just one; it
tests all the parser transforms. That makes it a functional test
suite, wich isn't appropriate. The correct place for these tests is
in test/test_transforms/test_final_checks.py; added (thanks for moving
the transform code). I also removed the ParserTransformTestCase.
There's a problem with the structure model as it stands:
<!ENTITY % structure.model
" ( ( (%body.elements; | topic | sidebar)+,
(transition, (%body.elements; | topic | sidebar)+ )*,
( (%section.elements;), (transition?, (%section.elements;)
)* )? )
(Continue reading)
>
> In this case, it's a feature.
> docutils.writers.html4css1.HTMLTranslator.visit_paragraph contains
> this comment:
>
> # Omit <p> tags if this is an only child and optimizable.
>
> This is done to minimize extraneous vertical whitespace that many
> browsers add with <p> tags, although they really shouldn't. Because
> of the way browsers render HTML, the Docutils HTML writer treats HTML
> as dumb markup (to a degree).
>
> Was this behavior causing any trouble?
I'm using docutils as part of a blog/wiki engine. For entries that
contain a single paragraph, I don't get any p tags and so don't have any
way to refer to the paragraph via CSS.
I noticed this when creating an index page which contains multiple
entries. Each entry is wrapped in its own div tag but I expected all the
text in each div to be wrapped in p tags but saw that they weren't in
some cases.
So I might not call it "trouble" but it could be annoying for me later
on. I was more annoyed by the inconsistency at this point. (Yes, I'm anal.)
RSS Feed