[vala/0.38] libvaladoc: Actually resolve "percnt;" to '%'



commit 32f8d4df73fa7b40b4339a4d01ef7fd94e1603aa
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Wed Nov 29 14:09:33 2017 +0100

    libvaladoc: Actually resolve "percnt;" to '%'

 libvaladoc/markupreader.vala               |    2 +-
 valadoc/tests/libvaladoc/markupreader.vala |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libvaladoc/markupreader.vala b/libvaladoc/markupreader.vala
index 595095d..c2e10a4 100644
--- a/libvaladoc/markupreader.vala
+++ b/libvaladoc/markupreader.vala
@@ -285,7 +285,7 @@ public class Valadoc.MarkupReader : Object {
                                        text_begin = current;
                                } else if (((string) next_pos).has_prefix ("percnt;")) {
                                        content.append (((string) text_begin).substring (0, (int) (current - 
text_begin)));
-                                       content.append_c ('>');
+                                       content.append_c ('%');
                                        current += 8;
                                        text_begin = current;
                                } else {
diff --git a/valadoc/tests/libvaladoc/markupreader.vala b/valadoc/tests/libvaladoc/markupreader.vala
index d38b4d4..3681b7e 100644
--- a/valadoc/tests/libvaladoc/markupreader.vala
+++ b/valadoc/tests/libvaladoc/markupreader.vala
@@ -189,7 +189,7 @@ public static void positive_2 () {
 
        token = reader.read_token (out begin, out end);
        assert (token == MarkupTokenType.TEXT);
-       assert (reader.content == "AA BB & \"' < > >");
+       assert (reader.content == "AA BB & \"' < > %");
        assert (reader.name == null);
        assert (reader.get_attributes ().size == 0);
        assert (reporter.warnings == 0);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]