[vala/staging] valadoc: Use HTML5 doctype in HTML doclet
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] valadoc: Use HTML5 doctype in HTML doclet
- Date: Wed, 4 Jul 2018 20:05:05 +0000 (UTC)
commit 391ec1209791157845732f2895aa0ef07b0fb6ef
Author: Alistair Thomas <astavale yahoo co uk>
Date: Wed Jul 4 20:42:41 2018 +0100
valadoc: Use HTML5 doctype in HTML doclet
libvaladoc/html/htmlmarkupwriter.vala | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/libvaladoc/html/htmlmarkupwriter.vala b/libvaladoc/html/htmlmarkupwriter.vala
index 3a3be3de0..5aa4afdea 100644
--- a/libvaladoc/html/htmlmarkupwriter.vala
+++ b/libvaladoc/html/htmlmarkupwriter.vala
@@ -25,22 +25,30 @@ using Valadoc.Content;
public class Valadoc.Html.MarkupWriter : Valadoc.MarkupWriter {
- public MarkupWriter (FileStream stream, bool xml_declaration = true) {
+ public MarkupWriter (FileStream stream, bool html5_declaration = true) {
// avoid broken implicit copy
unowned FileStream _stream = stream;
base ((str) => {
_stream.printf (str);
- }, xml_declaration);
+ }, false);
+
+ if (html5_declaration) {
+ do_write ("<!DOCTYPE html>");
+ }
}
- public MarkupWriter.builder (StringBuilder builder, bool xml_declaration = true) {
+ public MarkupWriter.builder (StringBuilder builder, bool html5_declaration = true) {
// avoid broken implicit copy
unowned StringBuilder _builder = builder;
base ((str) => {
_builder.append (str);
- }, xml_declaration);
+ }, false);
+
+ if (html5_declaration) {
+ do_write ("<!DOCTYPE html>");
+ }
}
public unowned MarkupWriter add_usemap (Charts.Chart chart) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]