OLD | NEW |
1 #!/usr/bin/env dart | 1 #!/usr/bin/env dart |
2 | 2 |
3 /// Converts block-style Doc comments in Dart code to line style. | 3 /// Converts block-style Doc comments in Dart code to line style. |
4 library line_doc_comments; | 4 library line_doc_comments; |
5 import 'dart:io'; | 5 import 'dart:io'; |
6 | 6 |
7 import '../pkg/pathos/lib/path.dart' as path; | 7 import '../pkg/pathos/lib/path.dart' as path; |
8 | 8 |
9 final oneLineBlock = new RegExp(r'^(\s*)/\*\*\s?(.*)\*/\s*$'); | 9 final oneLineBlock = new RegExp(r'^(\s*)/\*\*\s?(.*)\*/\s*$'); |
10 final startBlock = new RegExp(r'^(\s*)/\*\*(.*)$'); | 10 final startBlock = new RegExp(r'^(\s*)/\*\*(.*)$'); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // Got comment on /** line. | 76 // Got comment on /** line. |
77 line = match[2]; | 77 line = match[2]; |
78 } else { | 78 } else { |
79 // Just a pointless line, delete it! | 79 // Just a pointless line, delete it! |
80 line = null; | 80 line = null; |
81 } | 81 } |
82 } | 82 } |
83 } | 83 } |
84 } | 84 } |
85 | 85 |
86 if (line != null) buffer.add('$line\n'); | 86 if (line != null) buffer.write('$line\n'); |
87 } | 87 } |
88 | 88 |
89 return buffer.toString(); | 89 return buffer.toString(); |
90 } | 90 } |
OLD | NEW |