chiark / gitweb /
documentation/doxygen: recognize also <s> and <del> tags.
authorVladimír Vondruš <mosra@centrum.cz>
Sun, 2 Jan 2022 11:49:13 +0000 (12:49 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Sun, 2 Jan 2022 11:49:13 +0000 (12:49 +0100)
Followup to 12e0081a093ecf5e9dc287c549b4b521d45a2b6b.

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

index 714326340e87245ce2c8eca97baeb50275dfdedc..c38cad96ec8c56f29de27ceac158cb303f958534 100755 (executable)
@@ -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 += '<code>{}</code>'.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}</{0}>'.format(
index 486dd3a22bb0398c23790e7a43ce3747a30d39f2..9b6c17417b270e54e6d46180c70d020515989e8b 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>, <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>
+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> in <s>various</s> <s>ways</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 7808639fb29f4fb0b95089acba85eb81adbd24d5..da9948933971e59e213454170907c02dbe39c882 100644 (file)
@@ -28,12 +28,13 @@ text.</pre>
 
 @anchor an-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>".
+This is a `typewriter text`, *emphasis*, **bold** and ~~strikethrough~~ in
+<s>various</s> <del>ways</del>. <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;.