Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

+ Quoted sub/graph names to allow characters like :. (damphyr)

[git-p4: depot-paths = "//src/graph/dev/": change = 6909]
  • Loading branch information...
commit a0ec0197de303da359ef5367aeae62225dca4c08 1 parent 0461361
@zenspider zenspider authored
Showing with 4 additions and 3 deletions.
  1. +3 −2 lib/graph.rb
  2. +1 −1  test/test_graph.rb
View
5 lib/graph.rb
@@ -339,8 +339,9 @@ def cluster name, &block
def to_s
result = []
- type = graph ? "subgraph" : "digraph"
- result << "#{type} #{name}"
+ type = graph ? "subgraph " : "digraph "
+ type << "\"#{name}\"" if name and !name.empty?
+ result << type
result << " {"
graph_attribs.each do |line|
View
2  test/test_graph.rb
@@ -227,7 +227,7 @@ def test_to_s_subgraph
graph << g
-g_s = "subgraph subgraph
+g_s = "subgraph \"subgraph\"
{
\"a\";
\"c\";
Please sign in to comment.
Something went wrong with that request. Please try again.