From: Robert Konigsberg Date: Wed, 29 Feb 2012 00:10:24 +0000 (-0500) Subject: Clean up docs a little, fix "title" propagation bug. X-Git-Tag: v1.0.0~314^2~6 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=11c49f0e7c51707979bdcbabef8b2be1e0ce75db;hp=-c;p=dygraphs.git Clean up docs a little, fix "title" propagation bug. --- 11c49f0e7c51707979bdcbabef8b2be1e0ce75db diff --git a/generate-documentation.py b/generate-documentation.py index 71f25b7..8dbc68f 100755 --- a/generate-documentation.py +++ b/generate-documentation.py @@ -53,7 +53,14 @@ def search_files(type, files): # have the same name as a Dygraph option probably will be. prop_re = re.compile(r'\b([a-zA-Z0-9]+) *:') for test_file in files: - braced_html = find_braces(file(test_file).read()) + text = file(test_file).read() + # Hack for slipping past gallery demos that have title in their attributes + # so they don't appear as reasons for the demo to have 'title' options. + if type == "gallery": + idx = text.find("function(") + if idx >= 0: + text = text[idx:] + braced_html = find_braces(text) if debug_tests: print braced_html @@ -185,9 +192,9 @@ for label in sorted(labels): print """
%(name)s
- %(desc)s
+

%(desc)s

Type: %(type)s
%(parameters)s - Default: %(default)s
+ Default: %(default)s

Gallery Samples: %(gallery_html)s
Other Examples: %(examples_html)s