Handle includes like source.c#block

This commit is contained in:
Adam Roben
2014-11-13 13:45:02 -05:00
parent 613b71719f
commit 879e4977e4

View File

@@ -10,7 +10,7 @@ def find_includes(json)
when Hash when Hash
result = [] result = []
if inc = json["include"] if inc = json["include"]
result << inc unless inc.start_with?("#", "$") result << inc.split("#", 2).first unless inc.start_with?("#", "$")
end end
result + json.values.flat_map { |v| find_includes(v) } result + json.values.flat_map { |v| find_includes(v) }
when Array when Array