Documents/Pdf: fix progression
This commit is contained in:
@ -47,7 +47,7 @@ namespace Elwig.Documents {
|
||||
return Array.Empty<int>();
|
||||
} else if (line.StartsWith("progress:")) {
|
||||
var parts = line[9..].Trim().Split('/').Select(int.Parse).ToArray();
|
||||
progress?.Report(parts[0] / (double)parts[1]);
|
||||
progress?.Report(100.0 * parts[0] / parts[1]);
|
||||
} else if (line.StartsWith("success:")) {
|
||||
var m = Regex.Match(line, @"\(([0-9, ]+)\)");
|
||||
return m.Groups[1].Value.Split(", ").Select(int.Parse);
|
||||
|
Reference in New Issue
Block a user