Skip to content

Commit

Permalink
Check trailing spaces before line-break
Browse files Browse the repository at this point in the history
  • Loading branch information
RobH123 committed Nov 9, 2020
1 parent 5fe96ab commit b600d85
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 58 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "uw-content-validation",
"description": "Functions for Checking Door43.org Scriptural Content/Resources.",
"version": "0.8.17_alpha14",
"version": "0.8.17_alpha15",
"private": false,
"homepage": "https://unfoldingword.github.io/uw-content-validation/",
"repository": {
Expand Down
18 changes: 18 additions & 0 deletions src/__tests__/__snapshots__/book-package-check.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6977,6 +6977,24 @@ Object {
"rowID": "ab38",
"username": "unfoldingWord",
},
Object {
"C": "4",
"V": "intro",
"bookID": "RUT",
"characterIndex": 407,
"extra": "TN1",
"extract": "…in␣him.␣<br><br…",
"fieldName": "OccurrenceNote",
"filename": "en_tn_08-RUT.tsv",
"lineNumber": 205,
"location": " in en RUT book package from unfoldingWord master branch",
"message": "Unexpected trailing space(s) before break",
"priority": 94,
"repoCode": "TN1",
"repoName": "en_tn",
"rowID": "pz6m",
"username": "unfoldingWord",
},
Object {
"C": "4",
"V": "1",
Expand Down
70 changes: 35 additions & 35 deletions src/__tests__/__snapshots__/tn-table-row-check.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Object {
"location": " that was supplied",
"message": "Wrong book identifier",
"priority": 978,
"rowID": "d7qw",
"rowID": "o7qw",
},
],
}
Expand Down Expand Up @@ -60,7 +60,7 @@ Object {
"location": " that was supplied",
"message": "Link to TA should also be in OccurrenceNote",
"priority": 787,
"rowID": "d7qw",
"rowID": "n7qw",
},
Object {
"C": "1",
Expand All @@ -70,7 +70,7 @@ Object {
"location": " that was supplied",
"message": "Missing OccurrenceNote field",
"priority": 274,
"rowID": "d7qw",
"rowID": "n7qw",
},
],
}
Expand All @@ -88,7 +88,7 @@ Object {
"location": " that was supplied",
"message": "Link to TA should also be in OccurrenceNote",
"priority": 787,
"rowID": "d7qw",
"rowID": "m7qw",
},
Object {
"C": "1",
Expand All @@ -98,7 +98,7 @@ Object {
"location": " that was supplied",
"message": "Field is only whitespace",
"priority": 373,
"rowID": "d7qw",
"rowID": "m7qw",
},
],
}
Expand Down Expand Up @@ -145,7 +145,7 @@ Object {
"location": " that was supplied",
"message": "Unable to find original language quote in verse text",
"priority": 916,
"rowID": "d7qw",
"rowID": "b7qw",
},
],
}
Expand All @@ -164,7 +164,7 @@ Object {
"location": " that was supplied",
"message": "Unexpected leading space",
"priority": 109,
"rowID": "d7qw",
"rowID": "e7qw",
},
Object {
"C": "1",
Expand All @@ -177,10 +177,10 @@ Object {
"location": " that was supplied",
"message": "Seems original language quote might not start at the beginning of a word",
"priority": 620,
"rowID": "d7qw",
"rowID": "e7qw",
},
],
"suggestion": "GEN 1 2 d7qw figs-imperative וְ⁠חֹ֖שֶׁךְ 1 Darkness This is a command. By commanding that light should exist, God made it exist. (See: [[rc://*/ta/man/translate/figs-imperative]])",
"suggestion": "GEN 1 2 e7qw figs-imperative וְ⁠חֹ֖שֶׁךְ 1 Darkness This is a command. By commanding that light should exist, God made it exist. (See: [[rc://*/ta/man/translate/figs-imperative]])",
}
`;

Expand All @@ -197,7 +197,7 @@ Object {
"location": " that was supplied",
"message": "Unexpected leading word joiner",
"priority": 770,
"rowID": "d7qw",
"rowID": "g7qw",
},
Object {
"C": "1",
Expand All @@ -209,10 +209,10 @@ Object {
"location": " that was supplied",
"message": "Unable to find original language quote in verse text",
"priority": 916,
"rowID": "d7qw",
"rowID": "g7qw",
},
],
"suggestion": "GEN 1 2 d7qw figs-imperative וְ⁠חֹ֖שֶׁךְ 1 Darkness This is a command. By commanding that light should exist, God made it exist. (See: [[rc://*/ta/man/translate/figs-imperative]])",
"suggestion": "GEN 1 2 g7qw figs-imperative וְ⁠חֹ֖שֶׁךְ 1 Darkness This is a command. By commanding that light should exist, God made it exist. (See: [[rc://*/ta/man/translate/figs-imperative]])",
}
`;

Expand All @@ -229,7 +229,7 @@ Object {
"location": " that was supplied",
"message": "Unexpected leading zero-width joiner",
"priority": 771,
"rowID": "d7qw",
"rowID": "k7qw",
},
Object {
"C": "1",
Expand All @@ -241,10 +241,10 @@ Object {
"location": " that was supplied",
"message": "Unable to find original language quote in verse text",
"priority": 916,
"rowID": "d7qw",
"rowID": "k7qw",
},
],
"suggestion": "GEN 1 2 d7qw figs-imperative וְ⁠חֹ֖שֶׁךְ 1 Darkness This is a command. By commanding that light should exist, God made it exist. (See: [[rc://*/ta/man/translate/figs-imperative]])",
"suggestion": "GEN 1 2 k7qw figs-imperative וְ⁠חֹ֖שֶׁךְ 1 Darkness This is a command. By commanding that light should exist, God made it exist. (See: [[rc://*/ta/man/translate/figs-imperative]])",
}
`;

Expand All @@ -261,7 +261,7 @@ Object {
"location": " that was supplied",
"message": "Unable to find original language quote in verse text",
"priority": 916,
"rowID": "d7qw",
"rowID": "i7qw",
},
],
}
Expand All @@ -280,10 +280,10 @@ Object {
"location": " that was supplied",
"message": "Unexpected trailing space(s)",
"priority": 95,
"rowID": "d7qw",
"rowID": "f7qw",
},
],
"suggestion": "GEN 1 2 d7qw figs-imperative וְ⁠חֹ֖שֶׁךְ 1 Darkness This is a command. By commanding that light should exist, God made it exist. (See: [[rc://*/ta/man/translate/figs-imperative]])",
"suggestion": "GEN 1 2 f7qw figs-imperative וְ⁠חֹ֖שֶׁךְ 1 Darkness This is a command. By commanding that light should exist, God made it exist. (See: [[rc://*/ta/man/translate/figs-imperative]])",
}
`;

Expand All @@ -300,7 +300,7 @@ Object {
"location": " that was supplied",
"message": "Unexpected trailing word joiner",
"priority": 772,
"rowID": "d7qw",
"rowID": "h7qw",
},
Object {
"C": "1",
Expand All @@ -312,10 +312,10 @@ Object {
"location": " that was supplied",
"message": "Unable to find original language quote in verse text",
"priority": 916,
"rowID": "d7qw",
"rowID": "h7qw",
},
],
"suggestion": "GEN 1 2 d7qw figs-imperative וְ⁠חֹ֖שֶׁךְ 1 Darkness This is a command. By commanding that light should exist, God made it exist. (See: [[rc://*/ta/man/translate/figs-imperative]])",
"suggestion": "GEN 1 2 h7qw figs-imperative וְ⁠חֹ֖שֶׁךְ 1 Darkness This is a command. By commanding that light should exist, God made it exist. (See: [[rc://*/ta/man/translate/figs-imperative]])",
}
`;

Expand All @@ -332,7 +332,7 @@ Object {
"location": " that was supplied",
"message": "Unexpected trailing zero-width joiner",
"priority": 773,
"rowID": "d7qw",
"rowID": "l7qw",
},
Object {
"C": "1",
Expand All @@ -344,10 +344,10 @@ Object {
"location": " that was supplied",
"message": "Unable to find original language quote in verse text",
"priority": 916,
"rowID": "d7qw",
"rowID": "l7qw",
},
],
"suggestion": "GEN 1 2 d7qw figs-imperative וְ⁠חֹ֖שֶׁךְ 1 Darkness This is a command. By commanding that light should exist, God made it exist. (See: [[rc://*/ta/man/translate/figs-imperative]])",
"suggestion": "GEN 1 2 l7qw figs-imperative וְ⁠חֹ֖שֶׁךְ 1 Darkness This is a command. By commanding that light should exist, God made it exist. (See: [[rc://*/ta/man/translate/figs-imperative]])",
}
`;

Expand All @@ -364,7 +364,7 @@ Object {
"location": " that was supplied",
"message": "Unable to find original language quote in verse text",
"priority": 916,
"rowID": "d7qw",
"rowID": "j7qw",
},
],
}
Expand All @@ -381,7 +381,7 @@ Object {
"location": " that was supplied",
"message": "Missing OrigQuote field",
"priority": 919,
"rowID": "d7qw",
"rowID": "a7qw",
},
],
}
Expand All @@ -395,12 +395,12 @@ Object {
"V": "2",
"bookID": "GEN",
"details": "(not 5)",
"extract": "d7q33",
"extract": "r7q33",
"fieldName": "ID",
"location": " that was supplied",
"message": "Row ID should be exactly 4 characters",
"priority": 778,
"rowID": "d7q33",
"rowID": "r7q33",
},
],
}
Expand Down Expand Up @@ -430,15 +430,15 @@ Object {
"V": "2",
"bookID": "GEN",
"details": "(not 3)",
"extract": "d7q",
"extract": "q7q",
"fieldName": "ID",
"location": " that was supplied",
"message": "Row ID should be exactly 4 characters",
"priority": 778,
"rowID": "d7q",
"rowID": "q7q",
},
],
"suggestion": "GEN 1 2 d7qj figs-imperative וְ⁠חֹ֖שֶׁךְ 1 Darkness This is a command. By commanding that light should exist, God made it exist. (See: [[rc://*/ta/man/translate/figs-imperative]])",
"suggestion": undefined,
}
`;

Expand Down Expand Up @@ -1024,7 +1024,7 @@ Object {
"location": " that was supplied",
"message": "Resource container link should have '*' language code",
"priority": 450,
"rowID": "d7qw",
"rowID": "u7qw",
},
],
}
Expand All @@ -1043,7 +1043,7 @@ Object {
"location": " that was supplied",
"message": "Wrong book identifier",
"priority": 978,
"rowID": "d7qw",
"rowID": "t7qw",
},
],
}
Expand All @@ -1062,7 +1062,7 @@ Object {
"location": " that was supplied",
"message": "Wrong chapter number",
"priority": 976,
"rowID": "d7qw",
"rowID": "s7qw",
},
Object {
"C": "22",
Expand All @@ -1074,7 +1074,7 @@ Object {
"location": " that was supplied",
"message": "Wrong verse number",
"priority": 975,
"rowID": "d7qw",
"rowID": "s7qw",
},
],
}
Expand Down
Loading

0 comments on commit b600d85

Please sign in to comment.