Skip to content

Commit

Permalink
Fix empty subtask string split
Browse files Browse the repository at this point in the history
Bug introduced in commit eb32c72.
  • Loading branch information
Maumagnaguagno committed Nov 2, 2023
1 parent 7db646c commit 02f7d1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h1 style=margin:0>HTN Plan Viewer</h1>
data[m[1]] = ["\n " + m[1] + ' [label="' + m[2] + '" shape=box3d]', []];
else if(m = l.match(/^(\d+)\s+([\w\s()-]+?)\s+->\s+([\w()-]+)\s*([\d\s]*)$/)) // Method
if(m[2] === "__top" && m[3] === "__top_method") order = m[4];
else data[m[1]] = ["\n " + m[1] + ' [label="' + m[2] + '" shape=rectangle]; m' + m[1] + ' [label="' + m[3] + '"]; ' + m[1] + " -> m" + m[1] + " -> {" + m[4] + "}", m[4].split(/\s+/)];
else data[m[1]] = ["\n " + m[1] + ' [label="' + m[2] + '" shape=rectangle]; m' + m[1] + ' [label="' + m[3] + '"]; ' + m[1] + " -> m" + m[1] + " -> {" + m[4] + "}", m[4] ? m[4].split(/\s+/) : []];
else if(m = l.match(/^root\s+([\d\s]*)$/)) // Root
order = m[1];
else warnings += "Ignoring line " + (i+1) + ": " + l + "\n";
Expand Down

0 comments on commit 02f7d1e

Please sign in to comment.