Skip to content

Commit 87b0cd4

Browse files
committed
fix: grammar and doc strings
1 parent 5cbcac8 commit 87b0cd4

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

lib/dom-to-react.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function domToReact(nodes, options) {
5555
isWhitespace = !node.data.trim().length;
5656

5757
if (isWhitespace && node.parent && !canTextBeChildOfNode(node.parent)) {
58-
// We have a whitespace node that can't be nested in it's parent
58+
// We have a whitespace node that can't be nested in its parent
5959
// so skip it
6060
continue;
6161
}
@@ -66,7 +66,7 @@ function domToReact(nodes, options) {
6666
continue;
6767
}
6868

69-
// We have a text node thats not whitespace and it can be nested
69+
// We have a text node that's not whitespace and it can be nested
7070
// in its parent so add it to the results
7171
result.push(node.data);
7272
continue;

lib/utilities.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ var elementsWithNoTextChildren = new Set([
112112
]);
113113

114114
/**
115-
* Returns True if the the given node can contain text nodes
115+
* Checks if the given node can contain text nodes
116+
*
116117
* @param {DomElement} node
117118
* @returns {boolean}
118119
*/

test/utilities.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ describe('setStyleProp', () => {
130130

131131
describe('canTextBeChildOfNode', () => {
132132
it.each(Array.from(elementsWithNoTextChildren))(
133-
'returns false since text node can not be child of %s',
133+
'returns false since text node cannot be child of %s',
134134
nodeName => {
135135
const node = {
136136
name: nodeName

0 commit comments

Comments
 (0)