doxygen markdown页面中的标题标签使标题标题消失 [英] header label in doxygen markdown page makes header title disappear

查看:263
本文介绍了doxygen markdown页面中的标题标签使标题标题消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到doxygen 1.8.2有一个奇怪的问题.包含标题标签会导致标题标题从输出html中消失.

带有以下markdown文件:

Title            {#title}
=====

Section 1        {#section1}
---------
Text for section 1

我得到的输出为:

标题

第1部分的文字

但是,如果我从markdown文件中删除了{#section1}标签,则得到的正确输出为:

标题

第1部分

第1部分的文字

我在这里犯了什么错误?

编辑:在标记部分时,我观察到以下警告:

 warning: found subsection command outside of section context!

解决方案

经过一番调查,我认为这个出现是一个错误,但这只是因为它有点违反直觉.

请考虑以下内容:

The Main Section {#the_main_section}
================

Subsection One {#first}
--------------

Something highly interesting...

文档以1级标题开头(如此处所述)因此Doxygen将主要部分"解析为页面的名称和标题.将标头转换为页面名称后,标头和标签{#the_main_section}似乎将被忽略.

然后处理继续到文档的其余部分,当到达小节1"时,它认为小节"没有父级小节"(因为小节"已转换为页面名称) ),这就是cho住的地方.

更具体地说,由于它认为没有父节",因此它丢弃了该子节(标题).所有其他文本仍保留,但被视为页面"的一部分(无节父项).

修复"是在初始级别1标头"之后添加另一个级别1标头"

My Great Documentation (Which Becomes the Page Name)
====================================================

The First Section
=================

Q. What? I already created a level 1 heading?
A. Yup, but that was converted to a page name/title and discarded, so now
   we have to create another level 1 heading for my first section. Don't
   be fooled into thinking that the opening heading in this document is
   still treated as an opening heading by Doxygen - it's not!

I notice a strange problem with doxygen 1.8.2. Including a header label causes the header title to disappear from the output html.

With the following markdown file:

Title            {#title}
=====

Section 1        {#section1}
---------
Text for section 1

I get the output as:

Title

Text for section 1

But, if I remove the {#section1} label from the markdown file, I get the correct output as:

Title

Section 1

Text for section 1

What is the mistake I am making here?

Edit I observed the following warning when I label a section:

 warning: found subsection command outside of section context!

解决方案

After some investigation, I have decided this appears to be a bug, but only because it is slightly counter-intuitive.

Consider the following:

The Main Section {#the_main_section}
================

Subsection One {#first}
--------------

Something highly interesting...

The document starts with a level 1 header (as described here) and so Doxygen parses "The Main Section" as the name and title of the page. The header and the label {#the_main_section} appear to be disregarded once the header has been converted into a page name.

The processing then moves on to the rest of the document and When it reaches "Subsection One", it believes that there is no parent "Section" for the "subsection" (as the "Section" was converted to a page name) and this is where it chokes.

More specifically, it discards the subsection (header) as it believes there is no parent "section". All other text remains, but is treated as part of the "page" (with no section parent).

The "fix" is to add another "level 1 header" after the initial "level 1 header" e.g.

My Great Documentation (Which Becomes the Page Name)
====================================================

The First Section
=================

Q. What? I already created a level 1 heading?
A. Yup, but that was converted to a page name/title and discarded, so now
   we have to create another level 1 heading for my first section. Don't
   be fooled into thinking that the opening heading in this document is
   still treated as an opening heading by Doxygen - it's not!

这篇关于doxygen markdown页面中的标题标签使标题标题消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆