Skip to content

Commit

Permalink
dedoc: Break doc at any non-matching line
Browse files Browse the repository at this point in the history
  • Loading branch information
tomtom committed Jan 30, 2014
1 parent 6c8a01c commit 00fc197
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions ruby/vimdedoc.rb
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 00fc197

Please sign in to comment.