Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wwwanlingxiao
public-apis
Commits
fb28cbdb
Commit
fb28cbdb
authored
Aug 18, 2017
by
davemachado
Browse files
remove extra whitespace
parent
6289346b
Changes
1
Show whitespace changes
Inline
Side-by-side
build/validate_format.rb
View file @
fb28cbdb
...
...
@@ -34,18 +34,15 @@ sections = []
section_to_line_num
=
{}
section_to_entries
=
Hash
.
new
{
|
h
,
k
|
h
[
k
]
=
Array
.
new
}
File
.
foreach
(
filename
).
with_index
do
|
line
,
line_num
|
if
line
.
start_with?
(
'###'
)
section
=
line
.
sub
(
'###'
,
''
).
lstrip
.
chop
sections
.
push
(
section
)
section_to_line_num
[
section
]
=
line_num
+
1
end
# Skip non-markdown table lines and table schema lines
if
!
line
.
start_with?
(
'|'
)
||
line
.
eql?
(
"|---|---|---|---|---|
\n
"
)
next
end
# char to check is the first column
check_char
=
line
.
split
(
"|"
)[
1
].
strip
.
upcase
section_to_entries
[
section
].
push
(
check_char
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment