Permalink
Browse files

dedoc: Break doc at any non-matching line

  • Loading branch information...
tomtom committed Jan 30, 2014
1 parent 6c8a01c commit 00fc1975a355a0fd1e8e38ca53f8b16b8a412f6b
Showing with 18 additions and 17 deletions.
  1. +18 −17 ruby/vimdedoc.rb
View
@@ -4,7 +4,7 @@
# @License: GPL (see http://www.gnu.org/licenses/gpl.txt)
# @Created: 2007-07-25.
# @Last Change: 2012-08-28.
-# @Revision: 561
+# @Revision: 562
require 'yaml'
@@ -262,22 +262,6 @@ def collect_docs(filename, filetype=nil)
# p "DBG", line, line =~ break_rx, line =~ doc_rx, line =~ entry_rx
if line =~ /^finish\s*$/
break
- elsif line =~ break_rx
- if filedoc
- @fdocs[filename] += current_doc
- filedoc = false
- elsif !use_doc.nil?
- doc = compile_doc(current_doc, process_doc, :indent => 0, :nonl => use_doc =~ /\bnonl\b/)
- @docs[filename] << {
- :type => :doc,
- :doc => doc,
- :tag => use_doc =~ /\bnotag\b/ ? nil : (use_tag || '')
- }
- use_tag = nil
- use_doc = nil
- end
- current_doc = []
- current_indent = 0
elsif line =~ doc_rx
if skip_indent
skip_indent = false
@@ -369,6 +353,23 @@ def collect_docs(filename, filetype=nil)
end
current_doc = []
current_indent = 0
+ # elsif line =~ break_rx
+ else
+ if filedoc
+ @fdocs[filename] += current_doc
+ filedoc = false
+ elsif !use_doc.nil?
+ doc = compile_doc(current_doc, process_doc, :indent => 0, :nonl => use_doc =~ /\bnonl\b/)
+ @docs[filename] << {
+ :type => :doc,
+ :doc => doc,
+ :tag => use_doc =~ /\bnotag\b/ ? nil : (use_tag || '')
+ }
+ use_tag = nil
+ use_doc = nil
+ end
+ current_doc = []
+ current_indent = 0
end
end
end

0 comments on commit 00fc197

Please sign in to comment.