On 9/16/2009 2:34, Exe wrote:
>
>> What isn't working with section headers? They seem to be working fine
>> in the cases that I use them...
>>
>> Can you give an ReST example that is failing to render correctly?
>
> Shure. Test program to reproduce problem:
>
> ####################################
> from docutils.core import publish_parts
>
> content="""
> TEST HEADER
> ===========
>
> test
> """
>
> doc = publish_parts(source=content, writer_name="html4css1")
> print("FRAGMENT:")
> print(doc['fragment'])
> print
> print("FULL BODY:")
> print(doc['html_body'])
> ####################################This is intended behavior from docutils: if the reST document starts with a header it is considered the "document header" and is intentionally not a part of the fragment by default. Rather than using the body the correct approach would be to pass in the proper flag to disable "document headers" so that the opening. Rather than switch to the 'html_body', it probably makes more sense for Django's default template tag to open up a setting to provide additional flags to publish_parts/docutils writer/docutils transformer, such as the aforementioned one to disable document headers, or other generally useful flags such as the ones to enable certain security features. -- --Max Battcher-- http://worldmaker.net --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---
