diff options
| author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2022-11-13 16:15:23 +0000 |
|---|---|---|
| committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2022-11-13 16:15:23 +0000 |
| commit | 4a8b25042a2f1ddd499ff2df339613809ce96ac0 (patch) | |
| tree | 242cbd9b7f6af6796fc41d5e4272f450d4ecac86 /docutils/test/functional | |
| parent | 456cd24b162f3ad2cf622fc059ff1aa2f49e9d30 (diff) | |
| download | docutils-4a8b25042a2f1ddd499ff2df339613809ce96ac0.tar.gz | |
Refactor HTMLTranslator initialization and parts setup.
Use utils.xml_declaration().
Don't write charset (encoding) declaration if the intended output encoding
is not known.
Copy "meta" part content into "head" in `depart_document()`
(i.e. after collecting all items).
Obsoletes auxiliary method `add_meta()`. Remove it.
Changes to the HTML output (no space character before closing tag of XML
declaration, order of metadata elements) don't affect the HTML semantics,
styling, and rendering.
git-svn-id: https://svn.code.sf.net/p/docutils/code/trunk@9240 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/test/functional')
17 files changed, 21 insertions, 21 deletions
diff --git a/docutils/test/functional/expected/compact_lists.html b/docutils/test/functional/expected/compact_lists.html index 9a884c653..b2ee45a25 100644 --- a/docutils/test/functional/expected/compact_lists.html +++ b/docutils/test/functional/expected/compact_lists.html @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8" ?> +<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> diff --git a/docutils/test/functional/expected/dangerous.html b/docutils/test/functional/expected/dangerous.html index 1d4689bc7..41c108705 100644 --- a/docutils/test/functional/expected/dangerous.html +++ b/docutils/test/functional/expected/dangerous.html @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8" ?> +<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> diff --git a/docutils/test/functional/expected/embed_images_html5.html b/docutils/test/functional/expected/embed_images_html5.html index ae436afe4..e582eb371 100644 --- a/docutils/test/functional/expected/embed_images_html5.html +++ b/docutils/test/functional/expected/embed_images_html5.html @@ -1,8 +1,8 @@ <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> -<meta charset="utf-8"/> <meta name="viewport" content="width=device-width, initial-scale=1" /> +<meta charset="utf-8"/> <meta name="generator" content="Docutils 0.19.1b.dev: https://docutils.sourceforge.io/" /> <title>Embedded Images</title> <link rel="stylesheet" href="../input/data/minimal.css" type="text/css" /> diff --git a/docutils/test/functional/expected/field_name_limit.html b/docutils/test/functional/expected/field_name_limit.html index b9b382930..019a2c9af 100644 --- a/docutils/test/functional/expected/field_name_limit.html +++ b/docutils/test/functional/expected/field_name_limit.html @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8" ?> +<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> diff --git a/docutils/test/functional/expected/footnotes_html5.html b/docutils/test/functional/expected/footnotes_html5.html index 733baa90a..4310f7906 100644 --- a/docutils/test/functional/expected/footnotes_html5.html +++ b/docutils/test/functional/expected/footnotes_html5.html @@ -2,8 +2,8 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta charset="utf-8" /> -<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="generator" content="Docutils 0.19.1b.dev: https://docutils.sourceforge.io/" /> +<meta name="viewport" content="width=device-width, initial-scale=1" /> <title>Test footnote and citation rendering</title> <link rel="stylesheet" href="../input/data/minimal.css" type="text/css" /> <link rel="stylesheet" href="../input/data/responsive.css" type="text/css" /> diff --git a/docutils/test/functional/expected/math_output_html.html b/docutils/test/functional/expected/math_output_html.html index 68b9d440b..29011fbbc 100644 --- a/docutils/test/functional/expected/math_output_html.html +++ b/docutils/test/functional/expected/math_output_html.html @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8" ?> +<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> diff --git a/docutils/test/functional/expected/math_output_latex.html b/docutils/test/functional/expected/math_output_latex.html index 9faab8cab..7a6b94f27 100644 --- a/docutils/test/functional/expected/math_output_latex.html +++ b/docutils/test/functional/expected/math_output_latex.html @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8" ?> +<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> diff --git a/docutils/test/functional/expected/math_output_mathjax.html b/docutils/test/functional/expected/math_output_mathjax.html index 18b5ace74..a80d610eb 100644 --- a/docutils/test/functional/expected/math_output_mathjax.html +++ b/docutils/test/functional/expected/math_output_mathjax.html @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8" ?> +<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> diff --git a/docutils/test/functional/expected/math_output_mathml.html b/docutils/test/functional/expected/math_output_mathml.html index 5615b7d55..46deac3fc 100644 --- a/docutils/test/functional/expected/math_output_mathml.html +++ b/docutils/test/functional/expected/math_output_mathml.html @@ -2,8 +2,8 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta charset="utf-8" /> -<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="generator" content="Docutils 0.19.1b.dev: https://docutils.sourceforge.io/" /> +<meta name="viewport" content="width=device-width, initial-scale=1" /> <title>Mathematics</title> <link rel="stylesheet" href="../input/data/minimal.css" type="text/css" /> <link rel="stylesheet" href="../input/data/plain.css" type="text/css" /> diff --git a/docutils/test/functional/expected/misc_rst_html4css1.html b/docutils/test/functional/expected/misc_rst_html4css1.html index 6027bd975..9fec8d866 100644 --- a/docutils/test/functional/expected/misc_rst_html4css1.html +++ b/docutils/test/functional/expected/misc_rst_html4css1.html @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8" ?> +<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> diff --git a/docutils/test/functional/expected/misc_rst_html5.html b/docutils/test/functional/expected/misc_rst_html5.html index 068014f3e..8b48117d2 100644 --- a/docutils/test/functional/expected/misc_rst_html5.html +++ b/docutils/test/functional/expected/misc_rst_html5.html @@ -2,8 +2,8 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta charset="utf-8" /> -<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="generator" content="Docutils 0.19.1b.dev: https://docutils.sourceforge.io/" /> +<meta name="viewport" content="width=device-width, initial-scale=1" /> <title>Additional tests with HTML 5</title> <link rel="stylesheet" href="../input/data/minimal.css" type="text/css" /> <link rel="stylesheet" href="../input/data/responsive.css" type="text/css" /> diff --git a/docutils/test/functional/expected/pep_html.html b/docutils/test/functional/expected/pep_html.html index a67ec4744..bf3b009cf 100644 --- a/docutils/test/functional/expected/pep_html.html +++ b/docutils/test/functional/expected/pep_html.html @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8" ?> +<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- diff --git a/docutils/test/functional/expected/rst_html5_tuftig.html b/docutils/test/functional/expected/rst_html5_tuftig.html index 4a9174778..ab0531b37 100644 --- a/docutils/test/functional/expected/rst_html5_tuftig.html +++ b/docutils/test/functional/expected/rst_html5_tuftig.html @@ -2,8 +2,8 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta charset="utf-8" /> -<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="generator" content="Docutils 0.19.1b.dev: https://docutils.sourceforge.io/" /> +<meta name="viewport" content="width=device-width, initial-scale=1" /> <title>Special Features of the tuftig.css Stylesheet</title> <link rel="stylesheet" href="../input/data/minimal.css" type="text/css" /> <link rel="stylesheet" href="../input/data/tuftig.css" type="text/css" /> diff --git a/docutils/test/functional/expected/standalone_rst_html4css1.html b/docutils/test/functional/expected/standalone_rst_html4css1.html index 2b2d70823..be0d61105 100644 --- a/docutils/test/functional/expected/standalone_rst_html4css1.html +++ b/docutils/test/functional/expected/standalone_rst_html4css1.html @@ -1,10 +1,9 @@ -<?xml version="1.0" encoding="utf-8" ?> +<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="generator" content="Docutils 0.19.1b.dev: https://docutils.sourceforge.io/" /> -<title>reStructuredText Test Document</title> <meta content="reStructuredText, test, parser" name="keywords" /> <meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" /> <meta name="author" content="David Goodger" /> @@ -12,6 +11,7 @@ <meta name="organization" content="humankind" /> <meta name="date" content="Now, or yesterday. Or maybe even before yesterday." /> <meta name="copyright" content="This document has been placed in the public domain. You may do with it as you wish. You may copy, modify, redistribute, reattribute, sell, buy, rent, lease, destroy, or improve it, quote it at length, excerpt, incorporate, collate, fold, staple, or mutilate it, or do anything else to it that your or anyone else's heart desires." /> +<title>reStructuredText Test Document</title> <link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" /> <link rel="stylesheet" href="../input/data/math.css" type="text/css" /> </head> diff --git a/docutils/test/functional/expected/standalone_rst_html5.html b/docutils/test/functional/expected/standalone_rst_html5.html index 96e30d51b..0befeebec 100644 --- a/docutils/test/functional/expected/standalone_rst_html5.html +++ b/docutils/test/functional/expected/standalone_rst_html5.html @@ -2,9 +2,8 @@ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta charset="utf-8" /> -<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="generator" content="Docutils 0.19.1b.dev: https://docutils.sourceforge.io/" /> -<title>reStructuredText Test Document</title> +<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta content="reStructuredText, test, parser" name="keywords" /> <meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" xml:lang="en" /> <meta name="author" content="David Goodger" /> @@ -13,6 +12,7 @@ <meta name="author" content="I" /> <meta name="dcterms.date" content="Now, or yesterday. Or maybe even before yesterday." /> <meta name="dcterms.rights" content="This document has been placed in the public domain. You may do with it as you wish. You may copy, modify, redistribute, reattribute, sell, buy, rent, lease, destroy, or improve it, quote it at length, excerpt, incorporate, collate, fold, staple, or mutilate it, or do anything else to it that your or anyone else's heart desires." /> +<title>reStructuredText Test Document</title> <link rel="schema.dcterms" href="http://purl.org/dc/terms/"/> <link rel="stylesheet" href="../input/data/minimal.css" type="text/css" /> <link rel="stylesheet" href="../input/data/plain.css" type="text/css" /> diff --git a/docutils/test/functional/expected/standalone_rst_s5_html_1.html b/docutils/test/functional/expected/standalone_rst_s5_html_1.html index b8f901745..d46d5115b 100644 --- a/docutils/test/functional/expected/standalone_rst_s5_html_1.html +++ b/docutils/test/functional/expected/standalone_rst_s5_html_1.html @@ -1,13 +1,13 @@ -<?xml version="1.0" encoding="utf-8" ?> +<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="generator" content="Docutils 0.19.1b.dev: https://docutils.sourceforge.io/" /> <meta name="version" content="S5 1.1" /> -<title>Slide Shows</title> <meta name="author" content="David Goodger" /> <meta name="date" content="2005-11-28" /> +<title>Slide Shows</title> <link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" /> <!-- configuration parameters --> <meta name="defaultView" content="slideshow" /> diff --git a/docutils/test/functional/expected/standalone_rst_s5_html_2.html b/docutils/test/functional/expected/standalone_rst_s5_html_2.html index b972d0f56..78afd07cc 100644 --- a/docutils/test/functional/expected/standalone_rst_s5_html_2.html +++ b/docutils/test/functional/expected/standalone_rst_s5_html_2.html @@ -1,13 +1,13 @@ -<?xml version="1.0" encoding="utf-8" ?> +<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="generator" content="Docutils 0.19.1b.dev: https://docutils.sourceforge.io/" /> <meta name="version" content="S5 1.1" /> -<title>Slide Shows</title> <meta name="author" content="David Goodger" /> <meta name="date" content="2005-11-28" /> +<title>Slide Shows</title> <link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" /> <!-- configuration parameters --> <meta name="defaultView" content="slideshow" /> |
