From: Vladimír Vondruš Date: Mon, 29 Jan 2018 10:55:09 +0000 (+0100) Subject: doxygen: support
 tags.
X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=419fa8370bea7bad1b4946e798fcc4398eb00cc8;p=blog.git

doxygen: support 
 tags.

I can't comprehend why there is a separate  and
 tag.
---

diff --git a/doxygen/dox2html5.py b/doxygen/dox2html5.py
index fee4c88b..07e4b62b 100755
--- a/doxygen/dox2html5.py
+++ b/doxygen/dox2html5.py
@@ -214,7 +214,7 @@ def parse_desc_internal(state: State, element: ET.Element, immediate_parent: ET.
         # - 
         # - 
# - (if not describing return type) and - # - + # - , (those are the same thing!) # - , , # - , # - @@ -238,7 +238,7 @@ def parse_desc_internal(state: State, element: ET.Element, immediate_parent: ET. end_previous_paragraph = False # Straightforward elements - if i.tag in ['heading', 'blockquote', 'xrefsect', 'variablelist', 'verbatim', 'itemizedlist', 'orderedlist', 'image', 'table', '{http://mcss.mosra.cz/doxygen/}div']: + if i.tag in ['heading', 'blockquote', 'xrefsect', 'variablelist', 'verbatim', 'preformatted', 'itemizedlist', 'orderedlist', 'image', 'table', '{http://mcss.mosra.cz/doxygen/}div']: end_previous_paragraph = True # describing return type is cut out of text flow, so @@ -566,10 +566,10 @@ def parse_desc_internal(state: State, element: ET.Element, immediate_parent: ET. out.parsed += '' - elif i.tag == 'verbatim': + elif i.tag in ['verbatim', 'preformatted']: assert element.tag == 'para' # is inside a paragraph :/ has_block_elements = True - out.parsed += '
{}
'.format(html.escape(i.text)) + out.parsed += '
{}
'.format(html.escape(i.text)) elif i.tag == 'image': assert element.tag == 'para' # is inside a paragraph :/ diff --git a/doxygen/test/contents_typography/index.html b/doxygen/test/contents_typography/index.html index 6341068b..8c1b5082 100644 --- a/doxygen/test/contents_typography/index.html +++ b/doxygen/test/contents_typography/index.html @@ -22,8 +22,10 @@

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. Emphasis with typewriter and bold nested. http://google.com and URL. En-dash – and em-dash —. Reference to a Page subsection. Named reference with special characters in title: » Warnings «. Reference with escaped characters in title: <anchor>.

+

Page section

A blockquote.

Preformatted text.
+

Paragraph
with
explicit
line
breaks.

Differently
+  preformatted
+text.

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. Emphasis with typewriter and bold nested. http://google.com and URL. En-dash – and em-dash —. Reference to a Page subsection. Named reference with special characters in title: » Warnings «. Reference with escaped characters in title: <anchor>.

diff --git a/doxygen/test/contents_typography/input.dox b/doxygen/test/contents_typography/input.dox index 33fc329e..c35d0ff3 100644 --- a/doxygen/test/contents_typography/input.dox +++ b/doxygen/test/contents_typography/input.dox @@ -8,6 +8,10 @@ Paragraph \n with \n explicit \n line \n breaks. +
Differently
+  preformatted
+text.
+ @subsection subsection Page subsection - Unordered