Commits

Yuya Nishihara committed 347a0de

plantuml: parse command-line string by shlex

Comments (0)

Files changed (2)

 
 First, you may need to specify plantuml command in your conf.py::
 
-    plantuml = ['java', '-jar', '/path/to/plantuml.jar']
+    plantuml = 'java -jar /path/to/plantuml.jar'
 
 Instead, you can install a wrapper script in your PATH::
 

plantuml/sphinxcontrib/plantuml.py

     :copyright: Copyright 2010 by Yuya Nishihara <yuya@tcha.org>.
     :license: BSD, see LICENSE for details.
 """
-import os, re, subprocess
+import os, re, shlex, subprocess
 try:
     from hashlib import sha1
 except ImportError:  # Python<2.5
 
 def generate_plantuml_args(self, fileformat):
     if isinstance(self.builder.config.plantuml, basestring):
-        args = [self.builder.config.plantuml]
+        args = shlex.split(self.builder.config.plantuml)
     else:
         args = list(self.builder.config.plantuml)
     args.extend('-pipe -charset utf-8'.split())