Currently "rake notes" will search for the following patterns:
# FOO ....
where "FOO" is one of the valid keywords. Without thinking about it however, I have been using it like this:
# - FOO ....
# - FOO ....
So that when I generate rdocs for my app these lines come through as a bulleted list, not jumbled together in one long line. But "rake notes" doesn't find these.
The below patch fixes this and also allows for '# * FOO" as that also is used by rdoc to make lists.
Index: source_annotation_extractor.rb
===================================================================
--- source_annotation_extractor.rb (revision 146)
+++ source_annotation_extractor.rb (working copy)
@@ -31,9 +31,9 @@
if File.directory?(item)
results.update(find_in(item))
elsif item =~ /\.(builder|(r(?:b|xml|js)))$/
- results.update(extract_annotations_from(item, /#\s*(#{tag}):?\s*(.*)$/))
+ results.update(extract_annotations_from(item, /#[-*\s]*(#{tag}):?\s*(.*)$/))
elsif item =~ /\.(rhtml|erb)$/
- results.update(extract_annotations_from(item, /<%\s*#\s*(#{tag}):?\s*(.*?)\s*%>/))
+ results.update(extract_annotations_from(item, /<%\s*#[-*\s]*(#{tag}):?\s*(.*?)\s*%>/))
end
end