- only do string conversion on symbols (config :some_symbol).

This keeps support for regexp configs until I finally remove that.
This commit is contained in:
Jordan Sissel 2013-01-02 16:00:51 -08:00
parent 4f70986f39
commit d2649ce139

View file

@ -72,8 +72,12 @@ class LogStashConfigDocGenerator
# This will let us align comments with config options.
name, opts = eval(code)
# TODO(sissel): This hack is only required until regexp configs
# are gone from logstash.
name = name.to_s unless name.is_a?(Regexp)
description = BlueCloth.new(@comments.join("\n")).to_html
@attributes[name.to_s][:description] = description
@attributes[name][:description] = description
clear_comments
end # def add_config