[gtk-doc] mkhtml2: add some basic supprot for 'section'/'simplesect'
- From: Stefan Sauer <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] mkhtml2: add some basic supprot for 'section'/'simplesect'
- Date: Thu, 10 May 2018 19:43:29 +0000 (UTC)
commit 732d61084e275918044fdc549414891177b5a1ce
Author: Stefan Sauer <ensonic users sf net>
Date: Thu May 10 21:23:32 2018 +0200
mkhtml2: add some basic supprot for 'section'/'simplesect'
We need to track the nesting depth still.
https://bugzilla.gnome.org/show_bug.cgi?id=796011
gtkdoc/mkhtml2.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/gtkdoc/mkhtml2.py b/gtkdoc/mkhtml2.py
index ea9ea62..e622b0b 100644
--- a/gtkdoc/mkhtml2.py
+++ b/gtkdoc/mkhtml2.py
@@ -36,6 +36,8 @@ simplicity.
TODO:
- tag converters:
+ - 'section'/'simplesect' - the first we convert as a chunk, the nested ones we
+ need to convert as 'sect{2,3,4,...}
- inside 'footnote' one can have many tags, we only handle 'para'/'simpara'
- inside 'inlinemediaobject'/'mediaobject' a 'textobject' becomes the 'alt'
attr on the <img> tag of the 'imageobject'
@@ -1096,10 +1098,12 @@ convert_tags = {
'row': convert_row,
'sbr': convert_sbr,
'screen': convert_pre,
+ 'section': convert_sect2, # FIXME: need tracking of nesting
'sect1': convert_sect1_tag,
'sect2': convert_sect2,
'sect3': convert_sect3,
'simpara': convert_simpara,
+ 'simplesect': convert_sect2, # FIXME: need tracking of nesting
'structfield': convert_em_code,
'structname': convert_span,
'synopsis': convert_pre,
@@ -1487,6 +1491,10 @@ def convert_refentry(ctx):
return result
+def convert_section(ctx):
+ return convert_chunk_with_toc(ctx, 'section', 'h2')
+
+
def convert_sect1(ctx):
return convert_chunk_with_toc(ctx, 'sect1', 'h2')
@@ -1501,6 +1509,7 @@ convert_chunks = {
'preface': convert_preface,
'reference': convert_reference,
'refentry': convert_refentry,
+ 'section': convert_section,
'sect1': convert_sect1,
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]