diff options
| author | wiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2005-06-27 11:19:35 +0000 |
|---|---|---|
| committer | wiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2005-06-27 11:19:35 +0000 |
| commit | cbcb754503fce8880ecf7354c82089bde9e4ed22 (patch) | |
| tree | 58cfe13ef695827fa834d4550f04a4f3b8ff5aaa /docutils/examples.py | |
| parent | d6649c9ccd1a002ab28b59c11d12bbaf96a5d2a9 (diff) | |
| download | docutils-cbcb754503fce8880ecf7354c82089bde9e4ed22.tar.gz | |
changed html_fragment example to the more common html_body
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3598 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/examples.py')
| -rw-r--r-- | docutils/examples.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/docutils/examples.py b/docutils/examples.py index 3b099b482..96f6a0522 100644 --- a/docutils/examples.py +++ b/docutils/examples.py @@ -50,14 +50,13 @@ def html_parts(input_string, source_path=None, destination_path=None, writer_name='html', settings_overrides=overrides) return parts -def html_fragment(input_string, source_path=None, destination_path=None, - input_encoding='unicode', output_encoding='unicode', - doctitle=1, initial_header_level=1): +def html_body(input_string, source_path=None, destination_path=None, + input_encoding='unicode', output_encoding='unicode', + doctitle=1, initial_header_level=1): """ Given an input string, returns an HTML fragment as a string. - The return value is the contents of the <body> tag, less the title, - subtitle, and docinfo. + The return value is the contents of the <body> element. Parameters (see `html_parts()` for the remainder): @@ -69,7 +68,7 @@ def html_fragment(input_string, source_path=None, destination_path=None, destination_path=destination_path, input_encoding=input_encoding, doctitle=doctitle, initial_header_level=initial_header_level) - fragment = parts['fragment'] + fragment = parts['html_body'] if output_encoding != 'unicode': fragment = fragment.encode(output_encoding) return fragment |
