Chromium Code Reviews| Index: ppapi/generators/idl_c_proto.py |
| diff --git a/ppapi/generators/idl_c_proto.py b/ppapi/generators/idl_c_proto.py |
| index 2989a09afd449d61ba81780f1a3a1984720b30ce..fe00fc1f47494d215ccaf85fc6d763c0eb55378c 100755 |
| --- a/ppapi/generators/idl_c_proto.py |
| +++ b/ppapi/generators/idl_c_proto.py |
| @@ -609,6 +609,18 @@ class CGen(object): |
| if len(line) <= 80: |
| lines.append(line.rstrip()) |
| else: |
| + # URLs are permitted to be over 80 chars by the style guide. |
| + if 'http' in line: |
|
ddorwin
2013/09/07 04:31:43
minor issue: Should we create a new line if 'http'
ddorwin
2013/09/07 04:31:43
Should we combine this if with the one above?
If
DaleCurtis
2013/09/09 20:49:14
There are a lot of cases here that aren't handled;
DaleCurtis
2013/09/09 20:49:14
Done; though now space_break is always computed.
|
| + lines.append(line) |
| + continue |
| + |
| + # Break long typedefs on nearest space. |
| + space_break = line.rfind(' ', 0, 80) |
| + if not '(' in line and space_break >= 0: |
| + lines.append(line[0:space_break]) |
| + lines.append(' ' + line[space_break + 1:]) |
| + continue |
| + |
| left = line.rfind('(') + 1 |
| args = line[left:].split(',') |
| orig_args = args |