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 fd97051 commit 9c1ca3bCopy full SHA for 9c1ca3b
source/rules/body-leading-blank.js
@@ -1,13 +1,12 @@
1
export default (parsed, when) => {
2
const negated = when === 'never';
3
- const lines = (parsed.body || '').split('\n');
4
- console.log(parsed);
5
- console.log(lines);
+ // get complete body split into lines
+ const lines = (parsed.raw || '').split('\n').slice(1);
+ // check if the first line of body (if any) is empty
6
const leadingBlank =
7
lines.length > 0 ?
8
lines[0].length === 0 :
9
true;
10
- console.log(leadingBlank);
11
return [
12
negated ? !leadingBlank : leadingBlank,
13
[
0 commit comments