Skip to content

Commit 7d340e6

Browse files
committed
Fix formatting. Add docs.
1 parent 883352c commit 7d340e6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

meta/scripts/find_upgradeable_patterns.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
def count_known_instances(file)
2323
section_nodes = collect_section_nodes(file, "Known Instances")
2424
list_nodes = []
25+
2526
# pick the first list in the "Known Instances" section, and return the number of elements in that list.
2627
# CAUTION: this assumes a certain structure across all patterns. Therefore fairly brittle.
2728
list_nodes = section_nodes.select {|n| n.type == :list}
@@ -32,6 +33,7 @@ def count_known_instances(file)
3233
return known_instances_count
3334
end
3435

36+
# Extract all nodes below a given headline
3537
def collect_section_nodes(file, section_title)
3638
markdown = open(file).readlines().join
3739
doc = Commonmarker.parse(markdown)

0 commit comments

Comments
 (0)