mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 10:17:59 +01:00
Don't output blank lines for empty pageinfo sections.
This commit is contained in:
@@ -486,7 +486,7 @@ var Buffer = Module("buffer", {
|
|||||||
* section's output.
|
* section's output.
|
||||||
*/
|
*/
|
||||||
addPageInfoSection: function addPageInfoSection(option, title, func) {
|
addPageInfoSection: function addPageInfoSection(option, title, func) {
|
||||||
this.pageInfo[option] = [func, title];
|
this.pageInfo[option] = [func, title]; // TODO: are these reversed intentionally? --djk
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1023,10 +1023,9 @@ var Buffer = Module("buffer", {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let option = sections || options["pageinfo"];
|
let list = template.map(sections || options["pageinfo"], function (option) {
|
||||||
let list = template.map(option, function (option) {
|
let [data, title] = buffer.pageInfo[option];
|
||||||
let opt = buffer.pageInfo[option];
|
return template.table(title, data(true));
|
||||||
return opt ? template.table(opt[1], opt[0](true)) : undefined;
|
|
||||||
}, <br/>);
|
}, <br/>);
|
||||||
dactyl.echo(list, commandline.FORCE_MULTILINE);
|
dactyl.echo(list, commandline.FORCE_MULTILINE);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -292,7 +292,6 @@ var Template = Module("Template", {
|
|||||||
// </e4x>
|
// </e4x>
|
||||||
if (table.tr.length() > 1)
|
if (table.tr.length() > 1)
|
||||||
return table;
|
return table;
|
||||||
return XML();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
tabular: function tabular(headings, style, iter) {
|
tabular: function tabular(headings, style, iter) {
|
||||||
|
|||||||
Reference in New Issue
Block a user