diff options
| author | goodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2002-09-24 02:15:39 +0000 |
|---|---|---|
| committer | goodger <goodger@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2002-09-24 02:15:39 +0000 |
| commit | 6850b736f8e76cf6e9bba59655699490f7eace29 (patch) | |
| tree | cd6077bdabdc23b83d0d940285b557532a3a628f | |
| parent | c4ff0db8f61ed95896392f1de1ab63cfe1a08520 (diff) | |
| download | docutils-6850b736f8e76cf6e9bba59655699490f7eace29.tar.gz | |
Fixed "xml:space" attribute.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@711 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
21 files changed, 121 insertions, 121 deletions
diff --git a/docutils/test/test_parsers/test_rst/test_citations.py b/docutils/test/test_parsers/test_rst/test_citations.py index 8e0cd0b85..508a5f9a0 100755 --- a/docutils/test/test_parsers/test_rst/test_citations.py +++ b/docutils/test/test_parsers/test_rst/test_citations.py @@ -126,9 +126,9 @@ No blank line. """, """\ <document source="test data"> - <comment xml:space="1"> + <comment xml:space="preserve"> [citation label with spaces] this isn't a citation - <comment xml:space="1"> + <comment xml:space="preserve"> [*citationlabelwithmarkup*] this isn't a citation """], ] diff --git a/docutils/test/test_parsers/test_rst/test_comments.py b/docutils/test/test_parsers/test_rst/test_comments.py index 42755e66b..193a6cfc1 100755 --- a/docutils/test/test_parsers/test_rst/test_comments.py +++ b/docutils/test/test_parsers/test_rst/test_comments.py @@ -27,7 +27,7 @@ Paragraph. """, """\ <document source="test data"> - <comment xml:space="1"> + <comment xml:space="preserve"> A comment <paragraph> Paragraph. @@ -40,7 +40,7 @@ Paragraph. """, """\ <document source="test data"> - <comment xml:space="1"> + <comment xml:space="preserve"> A comment block. <paragraph> @@ -54,7 +54,7 @@ Paragraph. """, """\ <document source="test data"> - <comment xml:space="1"> + <comment xml:space="preserve"> A comment consisting of multiple lines starting on the line after the explicit markup start. @@ -67,9 +67,9 @@ Paragraph. """, """\ <document source="test data"> - <comment xml:space="1"> + <comment xml:space="preserve"> A comment. - <comment xml:space="1"> + <comment xml:space="preserve"> Another. <paragraph> Paragraph. @@ -82,7 +82,7 @@ Paragraph. """, """\ <document source="test data"> - <comment xml:space="1"> + <comment xml:space="preserve"> A comment <system_message level="2" line="2" source="test data" type="WARNING"> <paragraph> @@ -101,9 +101,9 @@ Paragraph. """, """\ <document source="test data"> - <comment xml:space="1"> + <comment xml:space="preserve"> A comment. - <comment xml:space="1"> + <comment xml:space="preserve"> Another. <system_message level="2" line="3" source="test data" type="WARNING"> <paragraph> @@ -120,7 +120,7 @@ Paragraph. """, """\ <document source="test data"> - <comment xml:space="1"> + <comment xml:space="preserve"> A comment:: <paragraph> Paragraph. @@ -134,7 +134,7 @@ the parser from recognizing a directive. """, """\ <document source="test data"> - <comment xml:space="1"> + <comment xml:space="preserve"> comment:: <paragraph> The extra newline before the comment text prevents @@ -149,7 +149,7 @@ the parser from recognizing a hyperlink target. """, """\ <document source="test data"> - <comment xml:space="1"> + <comment xml:space="preserve"> _comment: http://example.org <paragraph> The extra newline before the comment text prevents @@ -164,7 +164,7 @@ the parser from recognizing a citation. """, """\ <document source="test data"> - <comment xml:space="1"> + <comment xml:space="preserve"> [comment] Not a citation. <paragraph> The extra newline before the comment text prevents @@ -179,7 +179,7 @@ the parser from recognizing a substitution definition. """, """\ <document source="test data"> - <comment xml:space="1"> + <comment xml:space="preserve"> |comment| image:: bogus.png <paragraph> The extra newline before the comment text prevents @@ -195,10 +195,10 @@ the parser from recognizing a substitution definition. """, """\ <document source="test data"> - <comment xml:space="1"> + <comment xml:space="preserve"> Next is an empty comment, which serves to end this comment and prevents the following block quote being swallowed up. - <comment xml:space="1"> + <comment xml:space="preserve"> <block_quote> <paragraph> A block quote. @@ -221,7 +221,7 @@ term 2 <definition> <paragraph> definition 1 - <comment xml:space="1"> + <comment xml:space="preserve"> a comment <definition_list_item> <term> @@ -248,7 +248,7 @@ term 2 <definition> <paragraph> definition 1 - <comment xml:space="1"> + <comment xml:space="preserve"> a comment <definition_list> <definition_list_item> @@ -275,7 +275,7 @@ term 2 bullet paragraph 1 <paragraph> bullet paragraph 2 - <comment xml:space="1"> + <comment xml:space="preserve"> comment between bullet paragraphs 2 and 3 <paragraph> bullet paragraph 3 @@ -293,7 +293,7 @@ term 2 <list_item> <paragraph> bullet paragraph 1 - <comment xml:space="1"> + <comment xml:space="preserve"> comment between bullet paragraphs 1 (leader) and 2 <paragraph> bullet paragraph 2 @@ -309,7 +309,7 @@ term 2 <list_item> <paragraph> bullet - <comment xml:space="1"> + <comment xml:space="preserve"> trailing comment """], ] diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_contents.py b/docutils/test/test_parsers/test_rst/test_directives/test_contents.py index 645cb3d1d..cd89b1985 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_contents.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_contents.py @@ -122,7 +122,7 @@ totest['contents'] = [ Error in "contents" directive options: invalid option value: (option: "local"; value: 'arg') no argument is allowed; "arg" supplied. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. contents:: :local: arg """], @@ -157,7 +157,7 @@ totest['contents'] = [ Error in "contents" directive options: invalid option value: (option: "depth"; value: 'two') invalid literal for int(): two. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. contents:: :depth: two """], @@ -171,7 +171,7 @@ totest['contents'] = [ <paragraph> Error in "contents" directive options: unknown option: "width". - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. contents:: :width: 2 """], @@ -186,7 +186,7 @@ totest['contents'] = [ Error in "contents" directive options: invalid option value: (option: "backlinks"; value: 'no way!') "no way!" unknown; choose from "top", "entry", or "none". - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. contents:: :backlinks: no way! """], @@ -201,7 +201,7 @@ totest['contents'] = [ Error in "contents" directive options: invalid option value: (option: "backlinks"; value: None) must supply an argument; choose from "top", "entry", or "none". - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. contents:: :backlinks: """], diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_figures.py b/docutils/test/test_parsers/test_rst/test_directives/test_figures.py index cb88ec168..c1994cf88 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_figures.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_figures.py @@ -36,7 +36,7 @@ totest['figures'] = [ <system_message level="3" line="1" source="test data" type="ERROR"> <paragraph> Image URI contains whitespace. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. figure:: not an image URI """], ["""\ @@ -63,7 +63,7 @@ totest['figures'] = [ <system_message level="3" line="1" source="test data" type="ERROR"> <paragraph> Figure caption must be a paragraph or empty comment. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. figure:: picture.png \n\ - A picture with an invalid caption. @@ -78,7 +78,7 @@ totest['figures'] = [ <system_message level="3" line="1" source="test data" type="ERROR"> <paragraph> Image URI contains whitespace. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. figure:: not an image URI \n\ And a caption. diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_images.py b/docutils/test/test_parsers/test_rst/test_directives/test_images.py index 1f563020b..db413fb6e 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_images.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_images.py @@ -35,7 +35,7 @@ totest['images'] = [ <system_message level="3" line="1" source="test data" type="ERROR"> <paragraph> Missing image URI argument. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. image:: """], ["""\ @@ -46,7 +46,7 @@ totest['images'] = [ <system_message level="3" line="1" source="test data" type="ERROR"> <paragraph> Image URI contains whitespace. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. image:: one two three """], ["""\ @@ -81,7 +81,7 @@ totest['images'] = [ <system_message level="3" line="1" source="test data" type="ERROR"> <paragraph> Missing image URI argument. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. image:: :height: 100 :width: 200 @@ -120,7 +120,7 @@ totest['images'] = [ Error in "image" directive options: invalid option data: extension option field body may contain a single paragraph only (option "scale"). - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. image:: picture.png :scale: - 50 """], @@ -135,7 +135,7 @@ totest['images'] = [ Error in "image" directive options: invalid option value: (option: "scale"; value: None) object can't be converted to int. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. image:: picture.png :scale: """], @@ -149,7 +149,7 @@ totest['images'] = [ <paragraph> Error in "image" directive options: invalid option block. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. image:: picture.png :scale 50 """], @@ -162,7 +162,7 @@ totest['images'] = [ <system_message level="3" line="1" source="test data" type="ERROR"> <paragraph> Image URI contains whitespace. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. image:: picture.png scale: 50 """], @@ -176,7 +176,7 @@ totest['images'] = [ <paragraph> Error in "image" directive options: invalid option block. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. image:: picture.png :: 50 """], @@ -190,7 +190,7 @@ totest['images'] = [ <paragraph> Error in "image" directive options: unknown option: "sale". - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. image:: picture.png :sale: 50 """], @@ -204,7 +204,7 @@ totest['images'] = [ <paragraph> Error in "image" directive options: invalid option data: extension option field name may not contain multiple words. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. image:: picture.png :scale is: 50 """], @@ -219,7 +219,7 @@ totest['images'] = [ Error in "image" directive options: invalid option value: (option: "scale"; value: 'fifty') invalid literal for int(): fifty. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. image:: picture.png :scale: fifty """], @@ -234,7 +234,7 @@ totest['images'] = [ <paragraph> Error in "image" directive options: invalid option data: duplicate option "scale". - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. image:: picture.png :scale: 50 :scale: 50 diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_meta.py b/docutils/test/test_parsers/test_rst/test_directives/test_meta.py index 1e92c30b4..758414085 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_meta.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_meta.py @@ -136,7 +136,7 @@ Paragraph <system_message level="1" line="2" source="test data" type="INFO"> <paragraph> No content for meta tag "empty". - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> :empty: """], ["""\ @@ -148,7 +148,7 @@ Paragraph <system_message level="3" line="2" source="test data" type="ERROR"> <paragraph> Invalid meta directive. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. meta:: not a field list """], @@ -170,7 +170,7 @@ Paragraph <system_message level="3" line="3" source="test data" type="ERROR"> <paragraph> Invalid meta directive. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. meta:: :name: content not a field @@ -184,7 +184,7 @@ Paragraph <system_message level="3" line="2" source="test data" type="ERROR"> <paragraph> Error parsing meta tag attribute "notattval": missing "=". - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> :name notattval: content """], ] diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_test_directives.py b/docutils/test/test_parsers/test_rst/test_directives/test_test_directives.py index 2081e6c1e..e8700e0ce 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_test_directives.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_test_directives.py @@ -58,7 +58,7 @@ Paragraph. <system_message level="1" line="1" source="test data" type="INFO"> <paragraph> Directive processed. Type="reStructuredText-test-directive", data="", directive block: - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> Directive block contains one paragraph, with a blank line before. <paragraph> Paragraph. @@ -74,7 +74,7 @@ Paragraph. <system_message level="1" line="1" source="test data" type="INFO"> <paragraph> Directive processed. Type="reStructuredText-test-directive", data="", directive block: - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> Directive block contains one paragraph, no blank line before. <paragraph> Paragraph. @@ -91,7 +91,7 @@ Paragraph. <system_message level="1" line="1" source="test data" type="INFO"> <paragraph> Directive processed. Type="reStructuredText-test-directive", data="", directive block: - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> block <system_message level="2" line="3" source="test data" type="WARNING"> <paragraph> diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_topics.py b/docutils/test/test_parsers/test_rst/test_directives/test_topics.py index 3054ef09d..a3276f01d 100644 --- a/docutils/test/test_parsers/test_rst/test_directives/test_topics.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_topics.py @@ -110,7 +110,7 @@ totest['topics'] = [ <system_message level="3" line="3" source="test data" type="ERROR"> <paragraph> Topics may not be nested within body elements. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. topic:: Nested \n\ Body. @@ -131,7 +131,7 @@ totest['topics'] = [ <system_message level="3" line="3" source="test data" type="ERROR"> <paragraph> Topics may not be nested within body elements. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. topic:: Nested \n\ Body. @@ -162,7 +162,7 @@ More. <system_message level="3" line="3" source="test data" type="ERROR"> <paragraph> Topics may not be nested within body elements. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. topic:: \n\ Nested diff --git a/docutils/test/test_parsers/test_rst/test_directives/test_unknown.py b/docutils/test/test_parsers/test_rst/test_directives/test_unknown.py index db448dec7..1f930a6a1 100755 --- a/docutils/test/test_parsers/test_rst/test_directives/test_unknown.py +++ b/docutils/test/test_parsers/test_rst/test_directives/test_unknown.py @@ -33,17 +33,17 @@ totest['unknown'] = [ <system_message level="3" line="1" source="test data" type="ERROR"> <paragraph> Unknown directive type "reStructuredText-unknown-directive". - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. reStructuredText-unknown-directive:: <system_message level="3" line="3" source="test data" type="ERROR"> <paragraph> Unknown directive type "reStructuredText-unknown-directive". - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. reStructuredText-unknown-directive:: argument <system_message level="3" line="5" source="test data" type="ERROR"> <paragraph> Unknown directive type "reStructuredText-unknown-directive". - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. reStructuredText-unknown-directive:: block """], diff --git a/docutils/test/test_parsers/test_rst/test_doctest_blocks.py b/docutils/test/test_parsers/test_rst/test_doctest_blocks.py index 7f5caefae..9e2f07655 100755 --- a/docutils/test/test_parsers/test_rst/test_doctest_blocks.py +++ b/docutils/test/test_parsers/test_rst/test_doctest_blocks.py @@ -32,7 +32,7 @@ Paragraph. <document source="test data"> <paragraph> Paragraph. - <doctest_block xml:space="1"> + <doctest_block xml:space="preserve"> >>> print "Doctest block." Doctest block. <paragraph> @@ -48,7 +48,7 @@ Paragraph. <document source="test data"> <paragraph> Paragraph. - <doctest_block xml:space="1"> + <doctest_block xml:space="preserve"> >>> print " Indented output." Indented output. """], @@ -63,7 +63,7 @@ Paragraph. <paragraph> Paragraph. <block_quote> - <doctest_block xml:space="1"> + <doctest_block xml:space="preserve"> >>> print " Indented block & output." Indented block & output. """], diff --git a/docutils/test/test_parsers/test_rst/test_field_lists.py b/docutils/test/test_parsers/test_rst/test_field_lists.py index cf2e3194d..6001d0771 100755 --- a/docutils/test/test_parsers/test_rst/test_field_lists.py +++ b/docutils/test/test_parsers/test_rst/test_field_lists.py @@ -304,7 +304,7 @@ Multiple body elements: containing multiple elements. <paragraph> Here's a literal block: - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> def f(x): return x**2 + x <paragraph> diff --git a/docutils/test/test_parsers/test_rst/test_literal_blocks.py b/docutils/test/test_parsers/test_rst/test_literal_blocks.py index fd322d796..2fe1c9b88 100755 --- a/docutils/test/test_parsers/test_rst/test_literal_blocks.py +++ b/docutils/test/test_parsers/test_rst/test_literal_blocks.py @@ -29,7 +29,7 @@ A paragraph:: <document source="test data"> <paragraph> A paragraph: - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> A literal block. """], ["""\ @@ -41,7 +41,7 @@ A paragraph with a space after the colons:: \n\ <document source="test data"> <paragraph> A paragraph with a space after the colons: - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> A literal block. """], ["""\ @@ -61,11 +61,11 @@ A final paragraph. <document source="test data"> <paragraph> A paragraph: - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> A literal block. <paragraph> Another paragraph: - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> Another literal block. With two blank lines following. <paragraph> @@ -84,7 +84,7 @@ one line:: A paragraph on more than one line: - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> A literal block. """], ["""\ @@ -103,7 +103,7 @@ one line:: <system_message level="3" line="4" source="test data" type="ERROR"> <paragraph> Unexpected indentation. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> A literal block with no blank line above. """], @@ -117,7 +117,7 @@ no blank line <document source="test data"> <paragraph> A paragraph: - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> A literal block. <system_message level="2" line="4" source="test data" type="WARNING"> <paragraph> @@ -134,7 +134,7 @@ A paragraph: :: <document source="test data"> <paragraph> A paragraph: - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> A literal block. """], ["""\ @@ -148,7 +148,7 @@ A paragraph: <document source="test data"> <paragraph> A paragraph: - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> A literal block. """], ["""\ @@ -165,7 +165,7 @@ A paragraph: Treating it as ordinary text because it's so short. <paragraph> A paragraph: - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> A literal block. """], ["""\ @@ -179,7 +179,7 @@ A paragraph: <document source="test data"> <paragraph> A paragraph: - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> A literal block. """], ["""\ @@ -209,7 +209,7 @@ A paragraph:: <document source="test data"> <paragraph> A paragraph: - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> A wonky literal block. Literal line 2. \n\ diff --git a/docutils/test/test_parsers/test_rst/test_outdenting.py b/docutils/test/test_parsers/test_rst/test_outdenting.py index d4daf3b49..e728ebbba 100755 --- a/docutils/test/test_parsers/test_rst/test_outdenting.py +++ b/docutils/test/test_parsers/test_rst/test_outdenting.py @@ -67,7 +67,7 @@ This paragraph ends the bullet list item before a block quote. <list_item> <paragraph> bullet - <comment xml:space="1"> + <comment xml:space="preserve"> Comments swallow up all indented text following. \n\ (Therefore this is not a) block quote. @@ -78,7 +78,7 @@ This paragraph ends the bullet list item before a block quote. <paragraph> If we want a block quote after this bullet list item, we need to use an empty comment: - <comment xml:space="1"> + <comment xml:space="preserve"> <block_quote> <paragraph> Block quote. diff --git a/docutils/test/test_parsers/test_rst/test_section_headers.py b/docutils/test/test_parsers/test_rst/test_section_headers.py index 385362706..acf5489d8 100755 --- a/docutils/test/test_parsers/test_rst/test_section_headers.py +++ b/docutils/test/test_parsers/test_rst/test_section_headers.py @@ -83,7 +83,7 @@ Test unexpected section titles. <system_message level="4" line="4" source="test data" type="SEVERE"> <paragraph> Unexpected section title. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> Title ===== <paragraph> @@ -91,12 +91,12 @@ Test unexpected section titles. <system_message level="4" line="7" source="test data" type="SEVERE"> <paragraph> Unexpected section title or transition. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> ----- <system_message level="4" line="9" source="test data" type="SEVERE"> <paragraph> Unexpected section title. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> Title ----- <paragraph> @@ -116,7 +116,7 @@ Test short underline. <system_message level="2" line="2" source="test data" type="WARNING"> <paragraph> Title underline too short. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> Title ==== <paragraph> @@ -161,7 +161,7 @@ Test overline title with inset. <system_message level="4" line="1" source="test data" type="SEVERE"> <paragraph> Incomplete section title. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> ======================== Test Missing Underline """], @@ -175,7 +175,7 @@ Test overline title with inset. <system_message level="4" line="1" source="test data" type="SEVERE"> <paragraph> Missing underline for overline. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> ======================== Test Missing Underline """], @@ -190,7 +190,7 @@ Test missing underline, with paragraph. <system_message level="4" line="1" source="test data" type="SEVERE"> <paragraph> Missing underline for overline. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> ======= Title <paragraph> @@ -211,7 +211,7 @@ Test long title and space normalization. <system_message level="2" line="1" source="test data" type="WARNING"> <paragraph> Title overline too short. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> ======= Long Title ======= @@ -230,7 +230,7 @@ Paragraph. <system_message level="4" line="1" source="test data" type="SEVERE"> <paragraph> Title overline & underline mismatch. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> ======= Title ------- @@ -280,7 +280,7 @@ Test missing titles; nothing in-between. <system_message level="3" line="1" source="test data" type="ERROR"> <paragraph> Invalid section title or transition marker. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> ======================== ======================== <paragraph> @@ -288,7 +288,7 @@ Test missing titles; nothing in-between. <system_message level="3" line="6" source="test data" type="ERROR"> <paragraph> Invalid section title or transition marker. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> ======================== ======================== """], @@ -313,7 +313,7 @@ Paragraph 4. """, """\ <document source="test data"> - <comment xml:space="1"> + <comment xml:space="preserve"> Test return to existing, highest-level section (Title 3). <section id="title-1" name="title 1"> <title> @@ -469,7 +469,7 @@ Paragraph 4. <system_message level="4" line="15" source="test data" type="SEVERE"> <paragraph> Title level inconsistent: - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> Title 4 ``````` <paragraph> @@ -520,7 +520,7 @@ Paragraph 4. <system_message level="4" line="19" source="test data" type="SEVERE"> <paragraph> Title level inconsistent: - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> ``````` Title 4 ``````` @@ -819,7 +819,7 @@ Yo """, """\ <document source="test data"> - <comment xml:space="1"> + <comment xml:space="preserve"> <system_message level="2" line="2" source="test data" type="WARNING"> <paragraph> Explicit markup ends without a blank line; unexpected unindent. diff --git a/docutils/test/test_parsers/test_rst/test_substitutions.py b/docutils/test/test_parsers/test_rst/test_substitutions.py index 9d6acc757..d6e129cb4 100755 --- a/docutils/test/test_parsers/test_rst/test_substitutions.py +++ b/docutils/test/test_parsers/test_rst/test_substitutions.py @@ -146,27 +146,27 @@ No blank line after. <system_message level="2" line="6" source="test data" type="WARNING"> <paragraph> Substitution definition "empty" missing contents. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. |empty| <system_message level="3" line="8" source="test data" type="ERROR"> <paragraph> Unknown directive type "directive". - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> directive:: symbol.png <system_message level="2" line="8" source="test data" type="WARNING"> <paragraph> Substitution definition "unknown" empty or invalid. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. |unknown| directive:: symbol.png <system_message level="2" line="10" source="test data" type="WARNING"> <paragraph> Substitution definition "invalid 1" empty or invalid. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. |invalid 1| there's no directive here <system_message level="2" line="11" source="test data" type="WARNING"> <paragraph> Substitution definition "invalid 2" empty or invalid. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. |invalid 2| there's no directive here With some block quote text, line 1. And some more, line 2. @@ -180,9 +180,9 @@ No blank line after. <system_message level="2" line="15" source="test data" type="WARNING"> <paragraph> Substitution definition "invalid 3" empty or invalid. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. |invalid 3| there's no directive here - <comment xml:space="1"> + <comment xml:space="preserve"> | bad name | bad data """], ] diff --git a/docutils/test/test_parsers/test_rst/test_tables.py b/docutils/test/test_parsers/test_rst/test_tables.py index e26aec960..c188a4214 100755 --- a/docutils/test/test_parsers/test_rst/test_tables.py +++ b/docutils/test/test_parsers/test_rst/test_tables.py @@ -64,7 +64,7 @@ totest['full_tables'] = [ <system_message level="3" line="1" source="test data" type="ERROR"> <paragraph> Malformed table. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> +-----------------------+ | A malformed table. | +-----------------------+ @@ -497,7 +497,7 @@ No blank line after table. <paragraph> Malformed table. Malformed table; parse incomplete. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> +--------------+-------------+ | A bad table. | | +--------------+ | @@ -728,7 +728,7 @@ no bottom border <paragraph> Malformed table. No bottom table border found. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> ============== ====== A simple table with no bottom border @@ -746,7 +746,7 @@ No blank line after table. <paragraph> Malformed table. No bottom table border found or no blank line after table bottom. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> ============== ====== A simple table cell 2 cell 3 cell 4 @@ -806,7 +806,7 @@ cell 3 cell 4 <paragraph> Malformed table. No bottom table border found or no blank line after table bottom. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> ============== ====== A simple table cell 2 cell 3 cell 4 @@ -830,7 +830,7 @@ cell 3 cell 4 <paragraph> Malformed table. Column span alignment problem at line offset 2. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> ============== ====== A bad table cell 2 cell 3 cell 4 @@ -848,7 +848,7 @@ cell 3 cell 4 <paragraph> Malformed table. Text in column margin at line offset 1. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> ======== ========= A bad table cell 2 cell 3 cell 4 @@ -973,7 +973,7 @@ cell 3 the bottom border below is too long <paragraph> Malformed table. Bottom/header table border does not match top border. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> ============== ====== A simple table this text extends to the right cell 3 the bottom border below is too long diff --git a/docutils/test/test_parsers/test_rst/test_targets.py b/docutils/test/test_parsers/test_rst/test_targets.py index e37ecfda1..b56962f96 100755 --- a/docutils/test/test_parsers/test_rst/test_targets.py +++ b/docutils/test/test_parsers/test_rst/test_targets.py @@ -82,17 +82,17 @@ Indirect hyperlink targets: <system_message level="2" line="1" source="test data" type="WARNING"> <paragraph> Hyperlink target contains whitespace. Perhaps a footnote was intended? - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. _target1: Not a proper hyperlink target <system_message level="2" line="3" source="test data" type="WARNING"> <paragraph> Hyperlink target contains whitespace. Perhaps a footnote was intended? - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. _target2: Although it ends with an underscore, this is not a phrase-link_ <system_message level="2" line="5" source="test data" type="WARNING"> <paragraph> Hyperlink target contains whitespace. Perhaps a footnote was intended? - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. _target3: A multi-line verson of something ending with an underscore, but not a phrase-link_ """], @@ -109,17 +109,17 @@ __ A multi-line verson of something <system_message level="2" line="1" source="test data" type="WARNING"> <paragraph> Hyperlink target contains whitespace. Perhaps a footnote was intended? - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> .. __: Not a proper hyperlink target <system_message level="2" line="3" source="test data" type="WARNING"> <paragraph> Anonymous hyperlink target contains whitespace. Perhaps a footnote was intended? - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> __ Although it ends with an underscore, this is not a phrase-link_ <system_message level="2" line="5" source="test data" type="WARNING"> <paragraph> Anonymous hyperlink target contains whitespace. Perhaps a footnote was intended? - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> __ A multi-line verson of something ending with an underscore, but not a phrase-link_ """], diff --git a/docutils/test/test_parsers/test_rst/test_transitions.py b/docutils/test/test_parsers/test_rst/test_transitions.py index cbbec169f..ca7aee5f4 100755 --- a/docutils/test/test_parsers/test_rst/test_transitions.py +++ b/docutils/test/test_parsers/test_rst/test_transitions.py @@ -132,7 +132,7 @@ Test unexpected transition markers. <system_message level="4" line="5" source="test data" type="SEVERE"> <paragraph> Unexpected section title or transition. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> -------- <paragraph> Paragraph. diff --git a/docutils/test/test_readers/test_pep/test_rfc2822.py b/docutils/test/test_readers/test_pep/test_rfc2822.py index 332008218..974d2c54b 100644 --- a/docutils/test/test_readers/test_pep/test_rfc2822.py +++ b/docutils/test/test_readers/test_pep/test_rfc2822.py @@ -77,7 +77,7 @@ Date: 2002-04-23 <field_body> <paragraph> 2002-04-23 - <comment xml:space="1"> + <comment xml:space="preserve"> Leading blank lines don't affect RFC-2822 header parsing. """], ["""\ @@ -89,7 +89,7 @@ Date: 2002-04-23 """, """\ <document source="test data"> - <comment xml:space="1"> + <comment xml:space="preserve"> A comment should prevent RFC-2822 header parsing. <paragraph> Author: Me diff --git a/docutils/test/test_transforms/test_docinfo.py b/docutils/test/test_transforms/test_docinfo.py index e5637d14c..0ecd6e2cb 100755 --- a/docutils/test/test_transforms/test_docinfo.py +++ b/docutils/test/test_transforms/test_docinfo.py @@ -59,7 +59,7 @@ totest['bibliographic_field_lists'] = ((DocInfo,), [ There can only be one abstract. <paragraph> It is automatically moved to the end of the other bibliographic elements. - <comment xml:space="1"> + <comment xml:space="preserve"> Bibliographic element extraction. """], ["""\ @@ -80,7 +80,7 @@ totest['bibliographic_field_lists'] = ((DocInfo,), [ <docinfo> <author> Me - <address xml:space="1"> + <address xml:space="preserve"> 123 My Street Example, EX <contact> @@ -110,7 +110,7 @@ totest['bibliographic_field_lists'] = ((DocInfo,), [ Abstract <paragraph> Abstract 1. - <comment xml:space="1"> + <comment xml:space="preserve"> Bibliographic element extraction. """], ["""\ @@ -160,7 +160,7 @@ totest['bibliographic_field_lists'] = ((DocInfo,), [ <system_message level="2" source="test data" type="WARNING"> <paragraph> Cannot extract empty bibliographic field "Version". - <comment xml:space="1"> + <comment xml:space="preserve"> and not empty either """], ["""\ @@ -320,7 +320,7 @@ derived (hacked) in parallel in order to stay in sync. test_docinfo.py <date> %s - <comment xml:space="1"> + <comment xml:space="preserve"> RCS keyword extraction. <paragraph> RCS keyword 'RCSfile' doesn't change unless the file name changes, diff --git a/docutils/test/test_transforms/test_doctitle.py b/docutils/test/test_transforms/test_doctitle.py index 83e92810a..583f79508 100755 --- a/docutils/test/test_transforms/test_doctitle.py +++ b/docutils/test/test_transforms/test_doctitle.py @@ -36,7 +36,7 @@ Paragraph. <document id="title" name="title" source="test data"> <title> Title - <comment xml:space="1"> + <comment xml:space="preserve"> test title promotion <paragraph> Paragraph. @@ -102,7 +102,7 @@ Test short underline. <system_message level="2" line="2" source="test data" type="WARNING"> <paragraph> Title underline too short. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> Title ==== <paragraph> @@ -124,7 +124,7 @@ The system_message should move after the document title <system_message level="2" line="1" source="test data" type="WARNING"> <paragraph> Title overline too short. - <literal_block xml:space="1"> + <literal_block xml:space="preserve"> ======= Long Title ======= @@ -152,7 +152,7 @@ Paragraph 3. <document id="title-1" name="title 1" source="test data"> <title> Title 1 - <comment xml:space="1"> + <comment xml:space="preserve"> Test multiple second-level titles. <paragraph> Paragraph 1. |
