From ce4f5551370bb43dbbb76c86342728e865da0211 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 19 May 2018 13:24:24 +0200 Subject: [PATCH] doxygen: implement . --- doxygen/dox2html5.py | 13 ++++++------- doxygen/test/contents_typography/index.html | 2 +- doxygen/test/contents_typography/input.dox | 10 +++++----- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/doxygen/dox2html5.py b/doxygen/dox2html5.py index 05105e4e..84545749 100755 --- a/doxygen/dox2html5.py +++ b/doxygen/dox2html5.py @@ -1231,15 +1231,14 @@ 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 == 'emphasis': - content = parse_inline_desc(state, i).strip() - if content: out.parsed += '{}'.format( - ' class="{}"'.format(add_inline_css_class) if add_inline_css_class else '', - content) + elif i.tag in ['emphasis', 'bold', 'small']: + mapping = {'emphasis': 'em', + 'bold': 'strong', + 'small': 'small'} - elif i.tag == 'bold': content = parse_inline_desc(state, i).strip() - if content: out.parsed += '{}'.format( + if content: out.parsed += '<{0}{1}>{2}'.format( + mapping[i.tag], ' class="{}"'.format(add_inline_css_class) if add_inline_css_class else '', content) diff --git a/doxygen/test/contents_typography/index.html b/doxygen/test/contents_typography/index.html index 0a33ca5c..ccbce771 100644 --- a/doxygen/test/contents_typography/index.html +++ b/doxygen/test/contents_typography/index.html @@ -25,7 +25,7 @@

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>.

Empty elements:


Above is a horizontal line.

+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. Small text. 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>.

Empty elements:


Above is a horizontal line.

diff --git a/doxygen/test/contents_typography/input.dox b/doxygen/test/contents_typography/input.dox index 7e5fdce9..86d248de 100644 --- a/doxygen/test/contents_typography/input.dox +++ b/doxygen/test/contents_typography/input.dox @@ -34,12 +34,12 @@ text. This is a `typewriter text`, *emphasis* and **bold**. Emphasis with typewriter and bold nested. http://google.com -and [URL](http://google.com). En-dash -- and em-dash ---. Reference to a -@ref subsection. Named reference with special characters in title: -@ref warnings "» Warnings «". Reference with escaped characters -in title: @ref an-anchor "". +and [URL](http://google.com). Small *text*. En-dash -- and +em-dash ---. Reference to a @ref subsection. Named reference with special +characters in title: @ref warnings "» Warnings «". Reference with +escaped characters in title: @ref an-anchor "". -Empty elements:

+Empty elements:    
 
 
 - - -
 
-- 
2.30.2