[valadoc] gtkdoc: Fix generated markup for source code blocks
- From: Florian Brosch <flobrosch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [valadoc] gtkdoc: Fix generated markup for source code blocks
- Date: Sun, 10 Jan 2016 22:11:31 +0000 (UTC)
commit 9d0548335f85d9f91a7c97532eba47e0c6c6d454
Author: Philip Withnall <philip withnall collabora co uk>
Date: Wed May 13 18:47:04 2015 +0200
gtkdoc: Fix generated markup for source code blocks
Just emitting <programlisting> doesn’t work, as gtk-doc will insert <para> tags in the middle of the code
block, generating invalid markup.
Instead of trying to reinvent how gtk-doc does things, just emit the gtk-doc shorthand markup for a code
block and let gtk-doc generate the markup.
https://bugzilla.gnome.org/show_bug.cgi?id=725194
src/doclets/gtkdoc/commentconverter.vala | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/doclets/gtkdoc/commentconverter.vala b/src/doclets/gtkdoc/commentconverter.vala
index 6950a1a..450e751 100644
--- a/src/doclets/gtkdoc/commentconverter.vala
+++ b/src/doclets/gtkdoc/commentconverter.vala
@@ -228,9 +228,9 @@ public class Gtkdoc.CommentConverter : ContentVisitor {
}
public override void visit_source_code (SourceCode code) {
- current_builder.append ("<programlisting>");
+ current_builder.append ("\n|[\n");
current_builder.append (Markup.escape_text (code.code));
- current_builder.append ("</programlisting>");
+ current_builder.append ("\n]|\n");
}
public override void visit_table (Table t) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]