From 0f5a7c76b2a9420b510a4fe913587918425d94cf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 7 Dec 2017 02:01:51 +0100 Subject: [PATCH] doxygen: be consistent with spacing in non-paired HTML tags. There is a space before the slash everywhere else, so have it here also. --- doxygen/dox2html5.py | 12 ++++++------ doxygen/test/compound_detailed/namespaceEno.html | 4 ++-- doxygen/test/compound_detailed/namespaceFoo.html | 6 +++--- doxygen/test/compound_detailed/namespaceType.html | 6 +++--- doxygen/test/compound_detailed/namespaceVar.html | 2 +- doxygen/test/compound_detailed/structTemplate.html | 12 ++++++------ .../structTemplate_3_01void_01_4.html | 2 +- doxygen/test/contents_tagfile/index.html | 2 +- doxygen/test/contents_typography/index.html | 2 +- doxygen/test/test_utility.py | 6 +++--- 10 files changed, 27 insertions(+), 27 deletions(-) diff --git a/doxygen/dox2html5.py b/doxygen/dox2html5.py index 10277e78..d408ef86 100755 --- a/doxygen/dox2html5.py +++ b/doxygen/dox2html5.py @@ -69,14 +69,14 @@ def add_wbr(text: str) -> str: if '<' in text: return text if '::' in text: # C++ names - return text.replace('::', '::') + return text.replace('::', '::') elif '_' in text: # VERY_LONG_UPPER_CASE macro names - return text.replace('_', '_') + return text.replace('_', '_') # These characters are quite common, so at least check that there is no # space (which may hint that the text is actually some human language): elif '/' in text and not ' ' in text: # URLs - return text.replace('/', '/') + return text.replace('/', '/') else: return text @@ -412,7 +412,7 @@ def parse_desc_internal(state: State, element: ET.Element, immediate_parent: ET. elif i.tag == 'linebreak': # Strip all whitespace before the linebreak, as it is of no use - out.parsed = out.parsed.rstrip() + '
' + out.parsed = out.parsed.rstrip() + '
' elif i.tag == 'programlisting': # If it seems to be a standalone code paragraph, don't wrap it in @@ -626,7 +626,7 @@ def parse_desc_internal(state: State, element: ET.Element, immediate_parent: ET. tail: str = html.escape(i.tail) if trim: tail = tail.strip() - elif out.parsed.endswith('
'): + elif out.parsed.endswith('
'): tail = tail.lstrip() out.parsed += tail @@ -1405,7 +1405,7 @@ def parse_xml(state: State, xml: str): compound.prefix_wbr += '_{}'.format(index+1) compound.prefix_wbr += '>' - compound.prefix_wbr += '::' + compound.prefix_wbr += '::' parsed = Empty() parsed.version = root.attrib['version'] diff --git a/doxygen/test/compound_detailed/namespaceEno.html b/doxygen/test/compound_detailed/namespaceEno.html index fa5cfa71..132ae50d 100644 --- a/doxygen/test/compound_detailed/namespaceEno.html +++ b/doxygen/test/compound_detailed/namespaceEno.html @@ -54,7 +54,7 @@

Enum documentation

- enum Eno::Boolean + enum Eno::Boolean

Boolean.

@@ -83,7 +83,7 @@

- enum Eno::(anonymous) + enum Eno::(anonymous)

diff --git a/doxygen/test/compound_detailed/namespaceFoo.html b/doxygen/test/compound_detailed/namespaceFoo.html index dae3234f..89a8fc80 100644 --- a/doxygen/test/compound_detailed/namespaceFoo.html +++ b/doxygen/test/compound_detailed/namespaceFoo.html @@ -77,7 +77,7 @@
template<class T>
- int Foo::foo(int a, + int Foo::foo(int a, std::string b, char(&things)[5], bool, @@ -122,7 +122,7 @@

- void Foo::bar(int in, + void Foo::bar(int in, int& out, void* shit) constexpr noexcept

@@ -149,7 +149,7 @@

- int Foo::justReturn() + int Foo::justReturn()

Function.

Enumerators
diff --git a/doxygen/test/compound_detailed/namespaceType.html b/doxygen/test/compound_detailed/namespaceType.html index 6a61e4e1..aab8ad7a 100644 --- a/doxygen/test/compound_detailed/namespaceType.html +++ b/doxygen/test/compound_detailed/namespaceType.html @@ -71,7 +71,7 @@
template<class T, typename = void>
- using Type::Foo = Bar<T, int> + using Type::Foo = Bar<T, int>

A templated type with just template details.

@@ -88,14 +88,14 @@

- typedef Me Type::Ugly + typedef Me Type::Ugly

Another typedef.

Details.

- typedef void(*Type::Func)(int, std::string&) + typedef void(*Type::Func)(int, std::string&)

Function pointer typedef.

Huh.

diff --git a/doxygen/test/compound_detailed/namespaceVar.html b/doxygen/test/compound_detailed/namespaceVar.html index e2afe5a7..e9f042fd 100644 --- a/doxygen/test/compound_detailed/namespaceVar.html +++ b/doxygen/test/compound_detailed/namespaceVar.html @@ -57,7 +57,7 @@

Variable documentation

- const int Var::a constexpr + const int Var::a constexpr

A value.

Details.

diff --git a/doxygen/test/compound_detailed/structTemplate.html b/doxygen/test/compound_detailed/structTemplate.html index 397501ee..037ced2e 100644 --- a/doxygen/test/compound_detailed/structTemplate.html +++ b/doxygen/test/compound_detailed/structTemplate.html @@ -120,7 +120,7 @@
template<class T, class U, class _3>
- enum class Template<T, U, _3>::Bar protected + enum class Template<T, U, _3>::Bar protected

Enum.

Should have just one template with _3 for unnamed parameter. Should also have the protected label in the details.

@@ -133,7 +133,7 @@
template<class T, class U, class _3>
- typedef A Template<T, U, _3>::B protected + typedef A Template<T, U, _3>::B protected

Typedef.

Should have just one template with _3 for unnamed parameter. Should also have the protected label in the details.

@@ -144,7 +144,7 @@ template<class T, class U, class _3> template<class V, bool = false>
- using Template<T, U, _3>::Foo = Buuu<V, false> protected + using Template<T, U, _3>::Foo = Buuu<V, false> protected

Template alias.

@@ -168,7 +168,7 @@
template<class T, class U, class _3>
- void Template<T, U, _3>::bar() + void Template<T, U, _3>::bar()

Another.

Should have just one template with _3 for unnamed parameter.

@@ -179,7 +179,7 @@ template<class T, class U, class _3> template<class V, int = 3> - void Template<T, U, _3>::foo() protected + void Template<T, U, _3>::foo() protected

Function.

@@ -203,7 +203,7 @@
template<class T, class U, class _3>
- int Template<T, U, _3>::aprotected + int Template<T, U, _3>::aprotected

Variable.

Should have just one template with _3 for unnamed parameter. Should also have the protected label in the details.

diff --git a/doxygen/test/compound_detailed/structTemplate_3_01void_01_4.html b/doxygen/test/compound_detailed/structTemplate_3_01void_01_4.html index 4d3f799b..69f4fcf5 100644 --- a/doxygen/test/compound_detailed/structTemplate_3_01void_01_4.html +++ b/doxygen/test/compound_detailed/structTemplate_3_01void_01_4.html @@ -69,7 +69,7 @@ template<> template<int b> - void Template<void>::baz() + void Template<void>::baz()

Function.

Should still have both templates repeated.

diff --git a/doxygen/test/contents_tagfile/index.html b/doxygen/test/contents_tagfile/index.html index 63cdf1ca..5973d184 100644 --- a/doxygen/test/contents_tagfile/index.html +++ b/doxygen/test/contents_tagfile/index.html @@ -37,7 +37,7 @@

My Project

-

See CORRADE_INTERNAL_ASSERT() for more information.

Corrade::Utility::Resource rx;
+

See CORRADE_INTERNAL_ASSERT() for more information.

Corrade::Utility::Resource rx;
diff --git a/doxygen/test/contents_typography/index.html b/doxygen/test/contents_typography/index.html index 2b8417a6..89ebeac7 100644 --- a/doxygen/test/contents_typography/index.html +++ b/doxygen/test/contents_typography/index.html @@ -38,7 +38,7 @@ My Project

Page section

A blockquote.

Preformatted text.
-

Paragraph
with
explicit
line
breaks.

Page subsection

  • Unordered
  • list
  • of
    • nested
    • items
  • and back

Sub-sub section

  1. Ordered
  2. list
  3. of
    1. nested
    2. items
  4. and back

This is a typewriter text, emphasis and bold. http://google.com and URL. En-dash – and em-dash —. Reference to a Page subsection.

+

Paragraph
with
explicit
line
breaks.

Page subsection

  • Unordered
  • list
  • of
    • nested
    • items
  • and back

Sub-sub section

  1. Ordered
  2. list
  3. of
    1. nested
    2. items
  4. and back

This is a typewriter text, emphasis and bold. http://google.com and URL. En-dash – and em-dash —. Reference to a Page subsection.

diff --git a/doxygen/test/test_utility.py b/doxygen/test/test_utility.py index 56460f6e..f22ee2bd 100644 --- a/doxygen/test/test_utility.py +++ b/doxygen/test/test_utility.py @@ -4,7 +4,7 @@ from dox2html5 import add_wbr class Utility(unittest.TestCase): def test_add_wbr(self): - self.assertEqual(add_wbr('Corrade::Containers'), 'Corrade::Containers') - self.assertEqual(add_wbr('CORRADE_TEST_MAIN()'), 'CORRADE_TEST_MAIN()') - self.assertEqual(add_wbr('http://magnum.graphics/showcase/'), 'http://magnum.graphics/showcase/') + self.assertEqual(add_wbr('Corrade::Containers'), 'Corrade::Containers') + self.assertEqual(add_wbr('CORRADE_TEST_MAIN()'), 'CORRADE_TEST_MAIN()') + self.assertEqual(add_wbr('http://magnum.graphics/showcase/'), 'http://magnum.graphics/showcase/') self.assertEqual(add_wbr('a'), 'a') -- 2.30.2