I working on my ANSI formatting code for jQuery Terminal. It almost working but I have one issue it's related to 0A ansi code that should move cursor (also other 0 cursor codes: B C D E F)
I've tested with ervy library and it make a difference If I remove
\x1b\[0[A-D] from the string before outputting to terminal.
I'm not sure If I process the ANSI escapes correctly, I'm splitting the output into lines before each line I'm increasing the y position and set x to 0 and when there is cursor ANSI escape code I move the cursor. And I'm using array of arrays to hold the output of the screen. (Not sure but I think it will be faster if I don't join the lines into one strings till the end, but I created this that way because it was first idea not because of speed).
I'm not sure that I should do if there is 0.
Here is the output of two plots from ervy library
plot without zero codes.
I'm trying to debugg my code (I think that on one point the plot look on the second screen), but I don't know how to process 0 ANSI escape codes.
I'm using Wikipedia as reference.