[gtk-doc] mkhtml2: only have one converter for 'code'
- From: Stefan Sauer <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] mkhtml2: only have one converter for 'code'
- Date: Fri, 30 Mar 2018 21:08:42 +0000 (UTC)
commit 13cc0bb914a1dfdd0372242e2e5e2efc673fa4bc
Author: Stefan Sauer <ensonic users sf net>
Date: Fri Mar 30 23:06:49 2018 +0200
mkhtml2: only have one converter for 'code'
Replace uses of convert_literal with it. Also use convert_code for <function>.
gtkdoc/mkhtml2.py | 19 ++++---------------
1 files changed, 4 insertions(+), 15 deletions(-)
---
diff --git a/gtkdoc/mkhtml2.py b/gtkdoc/mkhtml2.py
index 43553dc..f49b1fa 100644
--- a/gtkdoc/mkhtml2.py
+++ b/gtkdoc/mkhtml2.py
@@ -569,17 +569,6 @@ def convert_listitem(ctx, xml):
return result
-def convert_literal(ctx, xml):
- result = ['<code class="%s">' % xml.tag]
- if xml.text:
- result.append(xml.text)
- convert_inner(ctx, xml, result)
- result.append('</code>')
- if xml.tail:
- result.append(xml.tail)
- return result
-
-
def convert_orderedlist(ctx, xml):
result = ['<div class="orderedlistlist"><ol class="orderedlistlist" type="1">']
convert_inner(ctx, xml, result)
@@ -792,8 +781,8 @@ convert_tags = {
'emphasis': convert_span,
'entry': convert_entry,
'footnote': convert_footnote,
- 'filename': convert_literal,
- 'function': convert_span,
+ 'filename': convert_code,
+ 'function': convert_code,
'glossdef': convert_glossdef,
'glossdiv': convert_glossdiv,
'glossentry': convert_glossentry,
@@ -809,10 +798,10 @@ convert_tags = {
'legalnotice': convert_para_like,
'link': convert_link,
'listitem': convert_listitem,
- 'literal': convert_literal,
+ 'literal': convert_code,
'mediaobject': convert_div,
'note': convert_div,
- 'option': convert_literal,
+ 'option': convert_code,
'orderedlist': convert_orderedlist,
'para': convert_para,
'parameter': convert_em_class,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]