diff options
| author | goodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2006-11-12 18:02:01 +0000 |
|---|---|---|
| committer | goodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2006-11-12 18:02:01 +0000 |
| commit | 4338b64a7b6e3d027e151f8a90b021b8a46c1482 (patch) | |
| tree | 47128ac1a75369c0d15776bcfa9e08da6dfbf702 | |
| parent | f5682e3e7f5f3ca6da1450680e3edc7882a66c09 (diff) | |
| download | docutils-4338b64a7b6e3d027e151f8a90b021b8a46c1482.tar.gz | |
add functionality to internals() function
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@4800 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
| -rw-r--r-- | docutils/examples.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/docutils/examples.py b/docutils/examples.py index 9bbeb2ac3..3826aff3d 100644 --- a/docutils/examples.py +++ b/docutils/examples.py @@ -72,13 +72,17 @@ def html_body(input_string, source_path=None, destination_path=None, return fragment def internals(input_string, source_path=None, destination_path=None, - input_encoding='unicode'): + input_encoding='unicode', settings_overrides=None): """ Return the document tree and publisher, for exploring Docutils internals. Parameters: see `html_parts()`. """ - overrides = {'input_encoding': input_encoding} + if settings_overrides: + overrides = settings_overrides.copy() + else: + overrides = {} + overrides['input_encoding'] = input_encoding output, pub = core.publish_programmatically( source_class=io.StringInput, source=input_string, source_path=source_path, |
