From: Vladimír Vondruš Date: Sun, 2 Jan 2022 11:49:13 +0000 (+0100) Subject: documentation/doxygen: recognize also and tags. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=d4df895a7ca01c116dee61573672b51229318947;p=blog.git documentation/doxygen: recognize also and tags. Followup to 12e0081a093ecf5e9dc287c549b4b521d45a2b6b. --- diff --git a/documentation/doxygen.py b/documentation/doxygen.py index 71432634..c38cad96 100755 --- a/documentation/doxygen.py +++ b/documentation/doxygen.py @@ -1309,13 +1309,15 @@ def parse_desc_internal(state: State, element: ET.Element, immediate_parent: ET. content = parse_inline_desc(state, i).strip() if content: out.parsed += '{}'.format(content) - elif i.tag in ['emphasis', 'bold', 'small', 'superscript', 'subscript', 'strike']: + elif i.tag in ['emphasis', 'bold', 'small', 'superscript', 'subscript', 'strike', 's', 'del']: mapping = {'emphasis': 'em', 'bold': 'strong', 'small': 'small', 'superscript': 'sup', 'subscript': 'sub', - 'strike': 's'} + 'strike': 's', + 's': 's', + 'del': 's'} content = parse_inline_desc(state, i).strip() if content: out.parsed += '<{0}{1}>{2}'.format( diff --git a/documentation/test_doxygen/contents_typography/index.html b/documentation/test_doxygen/contents_typography/index.html index 486dd3a2..9b6c1741 100644 --- a/documentation/test_doxygen/contents_typography/index.html +++ b/documentation/test_doxygen/contents_typography/index.html @@ -25,7 +25,7 @@

A blockquote.

Preformatted text.
 

Paragraph
with
explicit
line
breaks.

Page section

Differently
   preformatted
-text.
  • Unordered
  • list
  • of
    • nested
    • items
  • and back
  1. Ordered
  2. list
  3. of
    1. nested
    2. items
  4. and back

This is a typewriter text, emphasis, bold and strikethrough. Emphasis with typewriter and bold nested. http://google.com and URL. Small text. En-dash – and em-dash —. Reference to a Page section. Named reference with special characters in title: » Warnings «. Reference with escaped characters in title: <anchor>.

2nd is L ∀ ∇ π ℜ ℑ This costs no $, €, £, ¥ or ¤.

Empty elements:


Above is a horizontal line.

+text.
  • Unordered
  • list
  • of
    • nested
    • items
  • and back
  1. Ordered
  2. list
  3. of
    1. nested
    2. items
  4. and back

This is a typewriter text, emphasis, bold and strikethrough in various ways. Emphasis with typewriter and bold nested. http://google.com and URL. Small text. En-dash – and em-dash —. Reference to a Page section. Named reference with special characters in title: » Warnings «. Reference with escaped characters in title: <anchor>.

2nd is L ∀ ∇ π ℜ ℑ This costs no $, €, £, ¥ or ¤.

Empty elements:


Above is a horizontal line.

diff --git a/documentation/test_doxygen/contents_typography/input.dox b/documentation/test_doxygen/contents_typography/input.dox index 7808639f..da994893 100644 --- a/documentation/test_doxygen/contents_typography/input.dox +++ b/documentation/test_doxygen/contents_typography/input.dox @@ -28,12 +28,13 @@ text. @anchor an-anchor -This is a `typewriter text`, *emphasis*, **bold** and ~~strikethrough~~. -Emphasis with typewriter and bold nested. -http://google.com and [URL](http://google.com). Small *text*. -En-dash -- and em-dash ---. Reference to a @ref section. Named reference with -special characters in title: @ref section "» Warnings «". -Reference with escaped characters in title: @ref an-anchor "". +This is a `typewriter text`, *emphasis*, **bold** and ~~strikethrough~~ in +various ways. Emphasis with typewriter and +bold nested. http://google.com and +[URL](http://google.com). Small *text*. En-dash -- and em-dash +---. Reference to a @ref section. Named reference with special characters in +title: @ref section "» Warnings «". Reference with escaped +characters in title: @ref an-anchor "". 2nd is L ∀ ∇ π ℜ ℑ This costs no $, €, £, ¥ or ¤.