fix lines count in yaml_root

This commit is contained in:
a-Sansara 2018-08-24 21:03:56 +02:00
parent 8dc1e7e436
commit efe4a48d8f

View File

@ -179,11 +179,11 @@ public class Pluie.Yaml.Dumper
yaml.append(! SHOW_LINE ? "" : of.c (ECHO.NUM).s ("%03d %s".printf (line++, of.c (ECHO.FILE).s ("|"))));
yaml.append("%YAML %s\n".printf (Yaml.YAML_VERSION));
foreach (var entry in node.tag_directives.entries) {
yaml.append(! SHOW_LINE ? "" : of.c (ECHO.NUM).s ("%03d %s".printf (line, of.c (ECHO.FILE).s ("|"))));
yaml.append(! SHOW_LINE ? "" : of.c (ECHO.NUM).s ("%03d %s".printf (line++, of.c (ECHO.FILE).s ("|"))));
yaml.append ("%TAG %s %s\n".printf (entry.key, entry.value));
}
if (show_doc) {
yaml.append(! SHOW_LINE ? "" : of.c (ECHO.NUM).s ("%03d %s".printf (line, of.c (ECHO.FILE).s ("|"))));
yaml.append(! SHOW_LINE ? "" : of.c (ECHO.NUM).s ("%03d %s".printf (line++, of.c (ECHO.FILE).s ("|"))));
yaml.append ("---\n");
}
}