blockdiag / nwdiag

Apache License 2.0
118 stars 20 forks source link

`rackdiag`: `ascending` does not seem to work for multiple racks #48

Open abravalheri opened 11 months ago

abravalheri commented 11 months ago

Hello, thank you very much for the very useful set of tools.

I am trying to combine the multiple racks setup with ascending, but I am having 2 problems:

1. It seems that I cannot use the ascending attribute inside of a rack block (which is in turn inside of a racdiag block). The following example will exit with an error:
rackdiag {
  rack {
    ascending;
    // define height of rack
    5U;

    // define description of rack
    description = "Tokyo/1234 East";

    // define rack units
    1: UPS [2U];   // define height of unit
    3: DB Server [5kg]  // define weight of unit
    4: Web Server [0.5A]  // define ampere of unit
  }

  rack {
    4U;
    description="Other";

    1: UPS [2U];
    3: DB Server
    4: Web Server
  }
}
 `ERROR: 3,14-3,14: got unexpected token: ';', expected: '='`
2. If I try to add the ascending attribute to the toplevel rackdiag (while keeping the 2 inner rack blocks), the error does not happen, but also the order of the items remains unchanged...

Is there any way to create a diagram with multiple racks in the ascending order?