Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/zensical/src/banks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,16 @@ def table_row(out, cols)
"`#{spec['name'].gsub /::.*/, ''}`"
end.uniq

# check if the bank name has any funny characters
spec_list.each do |spec|
unless spec['name'].match? /\A[a-zA-Z:]+\z/
raise "bank '#{spec['name']}' has unexpected character(s)"
end
if spec['name'].gsub(/::/, '').match? /:/ # FIXME: won't catch `::::`, `::::::`, etc.
raise "bank '#{spec['name']}' has unexpected colon(s)"
end
Comment on lines +160 to +162

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to decide on #1399 if we want to enforce double colons here

end

outMain.puts "\n## #{uniq_prefixes.join ', '} Banks"
outMain.puts "**Group ID:** #{group_id}\n\n"
table_row outMain, ['Item ID', 'Name', 'Description']
Expand Down
Loading