Open madhead opened 1 year ago
I've installed the latest version of the extension (0.3.5) and configured these settings:
0.3.5
{ "graphviz-interactive-preview.format.condenseAttributes": false, "graphviz-interactive-preview.view.themeColors": true }
Now I'm trying to reformat a simple dot file:
digraph { A -> B [ label = "A to B"; URL = "http://www.google.com"; ]; B -> C [ label = "B to C"; URL = "http://www.google.com"; ]; }
Every time I do that extra newlines are inserted between those two edges. Here is the video capture :point_down:
dot.webm
I would expect at max one newline between the edges and this number should not increase on reformats. No extra newlines should be added.
I've run the extension in debug mode, and I think this is the piece of code that adds extra newlines:
https://github.com/tintinweb/vscode-interactive-graphviz/blob/1074d8c264b05c9460aeacf1027fc5c61e43ac29/src/language/DocumentFormatter.ts#L99-L103
What is this lastLine for?
lastLine
Observable behavior
I've installed the latest version of the extension (
0.3.5
) and configured these settings:Now I'm trying to reformat a simple dot file:
Every time I do that extra newlines are inserted between those two edges. Here is the video capture :point_down:
dot.webm
Expected behavior
I would expect at max one newline between the edges and this number should not increase on reformats. No extra newlines should be added.