Skip to content

Instantly share code, notes, and snippets.

Created March 8, 2015 15:17
Show Gist options
  • Save anonymous/e54b3d1d661018d0db19 to your computer and use it in GitHub Desktop.
Save anonymous/e54b3d1d661018d0db19 to your computer and use it in GitHub Desktop.
Issue attachments for pydot/pydot-ng#66: https://github.com/pydot/pydot-ng/issues/66
--- pydot.py.orig 2012-02-15 19:07:57.000000000 +0100
+++ pydot.py 2012-02-15 19:08:07.000000000 +0100
@@ -141,8 +141,8 @@
dot_keywords = ['graph', 'subgraph', 'digraph', 'node', 'edge', 'strict']
-id_re_alpha_nums = re.compile('^[_a-zA-Z][a-zA-Z0-9_,]*$', re.UNICODE)
-id_re_alpha_nums_with_ports = re.compile('^[_a-zA-Z][a-zA-Z0-9_,:\"]*[a-zA-Z0-9_,\"]+$', re.UNICODE)
+id_re_alpha_nums = re.compile('^[_a-zA-Z0-9][a-zA-Z0-9_,]*$', re.UNICODE)
+id_re_alpha_nums_with_ports = re.compile('^[_a-zA-Z0-9][a-zA-Z0-9_,:\"]*[a-zA-Z0-9_,\"]+$', re.UNICODE)
id_re_num = re.compile('^[0-9,]+$', re.UNICODE)
id_re_with_port = re.compile('^([^:]*):([^:]*)$', re.UNICODE)
id_re_dbl_quoted = re.compile('^\".*\"$', re.S|re.UNICODE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment