parent
0f0994e7be
commit
8403dc832b
2 changed files with 2 additions and 1 deletions
|
@ -161,6 +161,7 @@ function parseTaskStatuses(doc: HTMLDocument): TaskStatus[] {
|
||||||
const pointsMatch = /((–|\.|\d)+) *\/ *(\d+)/.exec(pointsStr)
|
const pointsMatch = /((–|\.|\d)+) *\/ *(\d+)/.exec(pointsStr)
|
||||||
if (!pointsMatch) throw new Error()
|
if (!pointsMatch) throw new Error()
|
||||||
let points = +pointsMatch[2]
|
let points = +pointsMatch[2]
|
||||||
|
// points was a dash, means 0
|
||||||
if (isNaN(points)) {
|
if (isNaN(points)) {
|
||||||
points = 0
|
points = 0
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace Ksp.WebServer
|
||||||
ModifyTree(document, context.Request.Path.Value.Trim('/'));
|
ModifyTree(document, context.Request.Path.Value.Trim('/'));
|
||||||
|
|
||||||
var outputHtml = new StringWriter();
|
var outputHtml = new StringWriter();
|
||||||
document.ToHtml(outputHtml, new PrettyMarkupFormatter() { Indentation = "\t", NewLine = "\n" });
|
document.ToHtml(outputHtml, new HtmlMarkupFormatter());
|
||||||
return outputHtml.ToString();
|
return outputHtml.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue