Skip to content

Commit 51f0f99

Browse files
committed
edit typos in comments
1 parent 71a14c3 commit 51f0f99

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

packages/js/src/decorator/tinyMCE.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function markTinyMCE( editor, paper, marks ) {
3737

3838
/*
3939
* Get the information whether we want to mark a specific part of the HTML. If we do, `fieldsToMark` should return an array with that information.
40-
* For example, [ "subehading" ] means that we only want to apply the markings in subheadings only, and not the other parts.
40+
* For example, [ "subehading" ] means that we want to apply the markings in subheadings only, and not the other parts.
4141
* `selectedHTML` is an array of the HTML parts that we want to apply the marking to.
4242
*/
4343
const { fieldsToMark, selectedHTML } = languageProcessing.getFieldsToMark( marks, html );
@@ -46,7 +46,7 @@ function markTinyMCE( editor, paper, marks ) {
4646
forEach( marks, function( mark ) {
4747
/*
4848
* Classic editor uses double quotes for HTML attribute values. However, in `yoastseo`, we use single quotes for the attribute values
49-
* when we create the marked object. As the result, the replacement did not work, as the marks passed by `yoastseo` did not match anything
49+
* when we create the marked object. As a result, the replacement did not work, as the marks passed by `yoastseo` did not match anything
5050
* in the original text. This step is replacing the single quotes in the marked object output by `yoastseo` with double quotes.
5151
* This way, we make sure that the replacement can find a match between the original text of the marked object and the text in the page.
5252
*/

packages/yoastseo/spec/languageProcessing/helpers/html/replaceQuotesSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe( "replace-quotes", function() {
1212
.toEqual( "<yoastmark class=\"yoast-text-mark\">This is a test</yoastmark>" );
1313
} );
1414

15-
it( "should not replace single quotes outside HTML tags", function() {
15+
it( "should not replace single quotes (or apostrophes) outside HTML tags", function() {
1616
expect( replaceSingleQuotesInTags( "This is a test, let's go!" ) )
1717
.toEqual( "This is a test, let's go!" );
1818
} );

packages/yoastseo/src/languageProcessing/helpers/html/getFieldsToMark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { getSubheadings } from "./getSubheadings";
77
* @param {array} marks The array of mark objects.
88
* @param {string} html The html of the page where we want to apply the marking to.
99
*
10-
* @returns {{selectedHTML: *[], fieldsToMark: *}} The selected part of the html we want to apply the marking tp.
10+
* @returns {{selectedHTML: *[], fieldsToMark: *}} The selected part of the html we want to apply the marking to.
1111
*/
1212
export function getFieldsToMark( marks, html ) {
1313
const fieldsToMark = uniq( flatten( marks.map( mark => {

0 commit comments

Comments
 (0)