We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 883352c commit 7d340e6Copy full SHA for 7d340e6
meta/scripts/find_upgradeable_patterns.rb
@@ -22,6 +22,7 @@
22
def count_known_instances(file)
23
section_nodes = collect_section_nodes(file, "Known Instances")
24
list_nodes = []
25
+
26
# pick the first list in the "Known Instances" section, and return the number of elements in that list.
27
# CAUTION: this assumes a certain structure across all patterns. Therefore fairly brittle.
28
list_nodes = section_nodes.select {|n| n.type == :list}
@@ -32,6 +33,7 @@ def count_known_instances(file)
32
33
return known_instances_count
34
end
35
36
+# Extract all nodes below a given headline
37
def collect_section_nodes(file, section_title)
38
markdown = open(file).readlines().join
39
doc = Commonmarker.parse(markdown)
0 commit comments