From eded8006fd7ae58d51dcc05f56978c31a7a4f139 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 14 Dec 2017 22:40:50 +0100 Subject: [PATCH] doxygen: link text can contain nested elements. --- doxygen/dox2html5.py | 2 +- doxygen/test/contents_typography/index.html | 2 +- doxygen/test/contents_typography/input.dox | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doxygen/dox2html5.py b/doxygen/dox2html5.py index 378d7dff..261a2442 100755 --- a/doxygen/dox2html5.py +++ b/doxygen/dox2html5.py @@ -105,7 +105,7 @@ def parse_ref(state: State, element: ET.Element) -> str: else: class_ = 'm-dox' - return '{}'.format(url, class_, add_wbr(html.escape(element.text))) + return '{}'.format(url, class_, add_wbr(parse_inline_desc(state, element).strip())) def extract_id(element: ET.Element) -> str: id = element.attrib['id'] diff --git a/doxygen/test/contents_typography/index.html b/doxygen/test/contents_typography/index.html index 960cf0a2..c9fcfe7a 100644 --- a/doxygen/test/contents_typography/index.html +++ b/doxygen/test/contents_typography/index.html @@ -38,7 +38,7 @@ My Project

Page section

A blockquote.

Preformatted text.
-

Paragraph
with
explicit
line
breaks.

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.

+

Paragraph
with
explicit
line
breaks.

Page subsection

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

diff --git a/doxygen/test/contents_typography/input.dox b/doxygen/test/contents_typography/input.dox index 8d8e6c4e..32035291 100644 --- a/doxygen/test/contents_typography/input.dox +++ b/doxygen/test/contents_typography/input.dox @@ -31,7 +31,9 @@ Paragraph \n with \n explicit \n line \n breaks. 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. +@ref subsection. Named reference with special characters in title: +@ref warnings "» Warnings «". Reference with escaped characters in +title: @ref an-anchor "". */ -- 2.30.2