From 12e0081a093ecf5e9dc287c549b4b521d45a2b6b Mon Sep 17 00:00:00 2001 From: Cris Luengo Date: Fri, 18 Oct 2019 23:38:24 -0600 Subject: [PATCH] documentation: Added support for strikethrough markdown formatting in Doxygen documentation (`~~`). --- documentation/doxygen.py | 5 +++-- .../test_doxygen/contents_typography/index.html | 2 +- .../test_doxygen/contents_typography/input.dox | 12 ++++++------ 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/documentation/doxygen.py b/documentation/doxygen.py index 5257a520..e89568dd 100755 --- a/documentation/doxygen.py +++ b/documentation/doxygen.py @@ -1206,12 +1206,13 @@ 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']: + elif i.tag in ['emphasis', 'bold', 'small', 'superscript', 'subscript', 'strike']: mapping = {'emphasis': 'em', 'bold': 'strong', 'small': 'small', 'superscript': 'sup', - 'subscript': 'sub'} + 'subscript': 'sub', + 'strike': '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 7f158c21..486dd3a2 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.
  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. 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.
  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.

diff --git a/documentation/test_doxygen/contents_typography/input.dox b/documentation/test_doxygen/contents_typography/input.dox index c42607c3..7808639f 100644 --- a/documentation/test_doxygen/contents_typography/input.dox +++ b/documentation/test_doxygen/contents_typography/input.dox @@ -28,12 +28,12 @@ text. @anchor an-anchor -This is a `typewriter text`, *emphasis* and **bold**. 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~~. +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 ¤. -- 2.30.2