add pre tags for html
This commit is contained in:
parent
06b4a6057a
commit
ce958837e0
1 changed files with 2 additions and 0 deletions
|
|
@ -110,6 +110,7 @@ pub fn render(allocator: std.mem.Allocator, data: types.WeatherData, options: Re
|
||||||
defer output.deinit();
|
defer output.deinit();
|
||||||
|
|
||||||
const w = &output.writer;
|
const w = &output.writer;
|
||||||
|
if (options.format == .html) try w.writeAll("<pre>");
|
||||||
if (!options.no_caption)
|
if (!options.no_caption)
|
||||||
try w.print("Weather report: {s}\n\n", .{data.locationDisplayName()});
|
try w.print("Weather report: {s}\n\n", .{data.locationDisplayName()});
|
||||||
|
|
||||||
|
|
@ -122,6 +123,7 @@ pub fn render(allocator: std.mem.Allocator, data: types.WeatherData, options: Re
|
||||||
try renderForecastDay(w, day, options);
|
try renderForecastDay(w, day, options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (options.format == .html) try w.writeAll("</pre>");
|
||||||
|
|
||||||
return output.toOwnedSlice();
|
return output.toOwnedSlice();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue