chiark / gitweb /
documentation: Added support for strikethrough markdown formatting
authorCris Luengo <cris.l.luengo@gmail.com>
Sat, 19 Oct 2019 05:38:24 +0000 (23:38 -0600)
committerCris Luengo <cris.l.luengo@gmail.com>
Sat, 19 Oct 2019 05:38:24 +0000 (23:38 -0600)
in Doxygen documentation (`~~`).

documentation/doxygen.py
documentation/test_doxygen/contents_typography/index.html
documentation/test_doxygen/contents_typography/input.dox

index 5257a520f4371e021c4e038cde33fecd63937cfb..e89568dd20cd30ae66481887baf6428fca38c274 100755 (executable)
@@ -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 += '<code>{}</code>'.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}</{0}>'.format(
index 7f158c2140eb9b61ae7a9000ee2fd23b54fb87fe..486dd3a22bb0398c23790e7a43ce3747a30d39f2 100644 (file)
@@ -25,7 +25,7 @@
 <blockquote><p>A blockquote.</p></blockquote><pre>Preformatted text.
 </pre><p>Paragraph<br />with<br />explicit<br />line<br />breaks.</p><section id="section"><h2><a href="#section">Page section</a></h2><pre>Differently
   preformatted
-text.</pre><ul><li>Unordered</li><li>list</li><li>of<ul><li>nested</li><li>items</li></ul></li><li>and back</li></ul><ol><li>Ordered</li><li>list</li><li>of<ol><li>nested</li><li>items</li></ol></li><li>and back</li></ol><p><a name="an-anchor"></a> This is a <code>typewriter text</code>, <em>emphasis</em> and <strong>bold</strong>. <em>Emphasis with <code>typewriter</code> and <strong>bold</strong> nested.</em> <a href="http://google.com">http:/<wbr />/<wbr />google.com</a> and <a href="http://google.com">URL</a>. <small>Small <em>text</em>.</small> En-dash &ndash; and em-dash &mdash;. Reference to a <a href="index.html#section" class="m-doc">Page section</a>. Named reference with special characters in title: <a href="index.html#section" class="m-doc">&raquo; Warnings &laquo;</a>. Reference with escaped characters in&nbsp;title: <a href="index.html#an-anchor" class="m-doc">&lt;anchor&gt;</a>.</p><p>2<sup>nd</sup> is L<sub>&infin;</sub> &forall; &nabla; &pi; &real; &image; This costs no $, &euro;, &pound;, &yen; or &curren;.</p><p>Empty elements:</p><pre></pre><hr/><p>Above is a horizontal line.</p></section>
+text.</pre><ul><li>Unordered</li><li>list</li><li>of<ul><li>nested</li><li>items</li></ul></li><li>and back</li></ul><ol><li>Ordered</li><li>list</li><li>of<ol><li>nested</li><li>items</li></ol></li><li>and back</li></ol><p><a name="an-anchor"></a> This is a <code>typewriter text</code>, <em>emphasis</em>, <strong>bold</strong> and <s>strikethrough</s>. <em>Emphasis with <code>typewriter</code> and <strong>bold</strong> nested.</em> <a href="http://google.com">http:/<wbr />/<wbr />google.com</a> and <a href="http://google.com">URL</a>. <small>Small <em>text</em>.</small> En-dash &ndash; and em-dash &mdash;. Reference to a <a href="index.html#section" class="m-doc">Page section</a>. Named reference with special characters in title: <a href="index.html#section" class="m-doc">&raquo; Warnings &laquo;</a>. Reference with escaped characters in&nbsp;title: <a href="index.html#an-anchor" class="m-doc">&lt;anchor&gt;</a>.</p><p>2<sup>nd</sup> is L<sub>&infin;</sub> &forall; &nabla; &pi; &real; &image; This costs no $, &euro;, &pound;, &yen; or &curren;.</p><p>Empty elements:</p><pre></pre><hr/><p>Above is a horizontal line.</p></section>
       </div>
     </div>
   </div>
index c42607c329fd4af40b5c019b5aa18a7dbaf086dc..7808639fb29f4fb0b95089acba85eb81adbd24d5 100644 (file)
@@ -28,12 +28,12 @@ text.</pre>
 
 @anchor an-anchor
 
-This is a `typewriter text`, *emphasis* and **bold**. <em>Emphasis with
-<tt>typewriter</tt> and <strong>bold</strong> nested.</em> http://google.com
-and [URL](http://google.com). <small>Small *text*.</small> En-dash -- and
-em-dash ---. Reference to a @ref section. Named reference with special
-characters in title: @ref section "&raquo; Warnings &laquo;". Reference with
-escaped characters in&nbsp;title: @ref an-anchor "<anchor>".
+This is a `typewriter text`, *emphasis*, **bold** and ~~strikethrough~~.
+<em>Emphasis with <tt>typewriter</tt> and <strong>bold</strong> nested.</em>
+http://google.com and [URL](http://google.com). <small>Small *text*.</small>
+En-dash -- and em-dash ---. Reference to a @ref section. Named reference with
+special characters in title: @ref section "&raquo; Warnings &laquo;".
+Reference with escaped characters in&nbsp;title: @ref an-anchor "<anchor>".
 
 2<sup>nd</sup> is L<sub>&infin;</sub> &forall; &nabla; &pi; &real; &image;
 This costs no $, &euro;, &pound;, &yen; or &curren;.