mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
handle threadable and multi-line arrays
This commit is contained in:
parent
c2a32417be
commit
2632f1ede9
1 changed files with 7 additions and 1 deletions
|
@ -41,7 +41,7 @@ class LogStashConfigDocGenerator
|
|||
# nothing
|
||||
else
|
||||
# Join extended lines
|
||||
if line =~ /(, *$)|(\\$)/
|
||||
if line =~ /(, *$)|(\\$)|(\[ *$)/
|
||||
buffer += line.gsub(/\\$/, "")
|
||||
next
|
||||
end
|
||||
|
@ -144,6 +144,12 @@ class LogStashConfigDocGenerator
|
|||
|
||||
# Now parse the real library
|
||||
code = File.new(file).read
|
||||
|
||||
# inputs either inherit from Base or Threadable.
|
||||
if code =~ /\< LogStash::Inputs::Threadable/
|
||||
parse(File.new(File.join(File.dirname(file), "threadable.rb"), "r").read)
|
||||
end
|
||||
|
||||
parse(code)
|
||||
|
||||
puts "Generating docs for #{file}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue