Skip to content

Instantly share code, notes, and snippets.

@laprasdrum
Last active December 15, 2015 12:39
Show Gist options
  • Save laprasdrum/5262146 to your computer and use it in GitHub Desktop.
Save laprasdrum/5262146 to your computer and use it in GitHub Desktop.
Error code for blockdiag with class definition
blockdiag {
default_fontsize = 18;
orientation = portrait;
class page [shape = "roundedbox",textcolor = #ffffff,color = #1f497d];
class popup [shape = "roundedbox",textcolor = #ffffff,color = #4bacc7];
class condition[shape = "diamond",textcolor = #000000];
// node description
a [class = "page", label = "TOP\nhogehoge"];
d [class = "popup"];
a -> b -> c;
a -> d;
}
// 実行結果
$ blockdiag test.diag --debug
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/blockdiag-1.2.4-py2.7.egg/blockdiag/utils/bootstrap.py", line 34, in run
parsed = self.parse_diagram()
File "/Library/Python/2.7/site-packages/blockdiag-1.2.4-py2.7.egg/blockdiag/utils/bootstrap.py", line 82, in parse_diagram
return self.module.parser.parse_string(self.code)
File "/Library/Python/2.7/site-packages/blockdiag-1.2.4-py2.7.egg/blockdiag/parser.py", line 216, in parse_string
raise ParseException(str(e))
ParseException: got unexpected token: 5,13-5,14: Op '['
@laprasdrum
Copy link
Author

カラーコードをダブルクオートで囲むことで解決

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment