clemens-tolboom / uml-generator-php

http://clemens-tolboom.github.io/uml-generator-php/
MIT License
44 stars 5 forks source link

Syntax error for dot-command #17

Closed clemens-tolboom closed 10 years ago

clemens-tolboom commented 10 years ago

Running $ json2dot . | xargs -t -I {} dot -Tsvg -O {} I get

dot -Tsvg -O ./lib/Drupal/Component/Archiver/ArchiverException.dot
Error: syntax error in line 4
...
</table> ...
in label of node node_0

Inspecting file $ less ./lib/Drupal/Component/Archiver/ArchiverException.dot

graph "Class Diagram" {
  node [shape=plaintext]
  node_0 [
    label=<
<table border="1" cellpadding="2" cellspacing="0" cellborder="0">
<tr><td align="center" href="https://api.drupal.org/api/drupal/core!lib!Drupal!Component!Archiver!ArchiverException.php/class/ArchiverException/8">ArchiverException</td></tr><hr />
</table>
  >
  ];
}

I think the last


is not allowed there. Do we really need HR or can we do without?

clemens-tolboom commented 10 years ago

I removed the HR before the /TABLE and the error disappeared.

I'm not sure that's the solution and tried to construct a simple test for it but failed for now.

MartijnBraam commented 10 years ago

It seems it's invalid syntax to have a <HR> in a table without rows both above and under it. so it fails if a class only has properties or only methods