mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Handle includes like source.c#block
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user