Skip to content

Commit

Permalink
chore: Change escaped single-quoted strings after #7366
Browse files Browse the repository at this point in the history
  • Loading branch information
tofumatt committed Jul 24, 2018
1 parent edbbc5a commit 2d10143
Show file tree
Hide file tree
Showing 37 changed files with 67 additions and 67 deletions.
2 changes: 1 addition & 1 deletion core-blocks/categories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const name = 'core/categories';
export const settings = {
title: __( 'Categories' ),

description: __( 'Display a list of all your site\'s categories.' ),
description: __( "Display a list of all your site's categories." ),

icon: 'list-view',

Expand Down
2 changes: 1 addition & 1 deletion core-blocks/columns/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const settings = {
},
},

description: __( 'Add a block that displays content in multiple columns, then add whatever content blocks you\'d like.' ),
description: __( "Add a block that displays content in multiple columns, then add whatever content blocks you'd like." ),

supports: {
align: [ 'wide', 'full' ],
Expand Down
2 changes: 1 addition & 1 deletion core-blocks/freeform/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const name = 'core/freeform';
export const settings = {
title: __( 'Classic' ),

description: __( 'It\'s the classic WordPress editor and it\'s a block! Drop the editor right in.' ),
description: __( "It's the classic WordPress editor and it's a block! Drop the editor right in." ),

icon: 'editor-kitchensink',

Expand Down
2 changes: 1 addition & 1 deletion core-blocks/image/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const schema = {
export const settings = {
title: __( 'Image' ),

description: __( 'They\'re worth 1,000 words! Insert a single image.' ),
description: __( "They're worth 1,000 words! Insert a single image." ),

icon: 'format-image',

Expand Down
2 changes: 1 addition & 1 deletion core-blocks/more/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const name = 'core/more';
export const settings = {
title: __( 'More' ),

description: __( 'Want to show only part of this post on your blog\'s home page? Insert a "More" block where you want the split.' ),
description: __( `Want to show only part of this post on your blog's home page? Insert a "More" block where you want the split.` ),

icon: 'editor-insertmore',

Expand Down
2 changes: 1 addition & 1 deletion core-blocks/subhead/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const name = 'core/subhead';
export const settings = {
title: __( 'Subheading' ),

description: __( 'What\'s a subhead? Smaller than a headline, bigger than basic text.' ),
description: __( "What's a subhead? Smaller than a headline, bigger than basic text." ),

icon: 'text',

Expand Down
10 changes: 5 additions & 5 deletions core-blocks/test/full-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ describe( 'full post content fixture', () => {
).toEqual( parserOutputExpected );
} catch ( err ) {
throw new Error( format(
'File \'%s.parsed.json\' does not match expected value:\n\n%s',
"File '%s.parsed.json' does not match expected value:\n\n%s",
f,
err.message
) );
Expand Down Expand Up @@ -188,7 +188,7 @@ describe( 'full post content fixture', () => {
).toEqual( blocksExpected );
} catch ( err ) {
throw new Error( format(
'File \'%s.json\' does not match expected value:\n\n%s',
"File '%s.json' does not match expected value:\n\n%s",
f,
err.message
) );
Expand All @@ -214,7 +214,7 @@ describe( 'full post content fixture', () => {
expect( serializedActual ).toEqual( serializedExpected );
} catch ( err ) {
throw new Error( format(
'File \'%s.serialized.html\' does not match expected value:\n\n%s',
"File '%s.serialized.html' does not match expected value:\n\n%s",
f,
err.message
) );
Expand Down Expand Up @@ -253,7 +253,7 @@ describe( 'full post content fixture', () => {

if ( ! foundFixtures.length ) {
errors.push( format(
'Expected a fixture file called \'%s.html\' or \'%s__*.html\'.',
"Expected a fixture file called '%s.html' or '%s__*.html'.",
nameToFilename,
nameToFilename
) );
Expand All @@ -262,7 +262,7 @@ describe( 'full post content fixture', () => {
foundFixtures.forEach( ( fixture ) => {
if ( name !== fixture.firstBlock ) {
errors.push( format(
'Expected fixture file \'%s\' to test the \'%s\' block.',
"Expected fixture file '%s' to test the '%s' block.",
fixture.filename,
name
) );
Expand Down
2 changes: 1 addition & 1 deletion editor/components/autocompleters/test/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ describe( 'block', () => {
expect( labelComponents.at( 1 ).text() ).toBe( 'expected-text' );
} );

it( 'should derive isOptionDisabled from the item\'s isDisabled', () => {
it( "should derive isOptionDisabled from the item's isDisabled", () => {
const disabledInserterItem = {
name: 'core/foo',
title: 'foo',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { shallow } from 'enzyme';
import { BlockModeToggle } from '../block-mode-toggle';

describe( 'BlockModeToggle', () => {
it( 'should not render the HTML mode button if the block doesn\'t support it', () => {
it( "should not render the HTML mode button if the block doesn't support it", () => {
const wrapper = shallow(
<BlockModeToggle blockType={ { supports: { html: false } } } />
);
Expand Down
4 changes: 2 additions & 2 deletions editor/components/post-author/test/check.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe( 'PostAuthorCheck', () => {
expect( wrapper.type() ).toBe( null );
} );

it( 'should not render anything if doesn\'t have author action', () => {
it( "should not render anything if doesn't have author action", () => {
const wrapper = shallow(
<PostAuthorCheck authors={ users } hasAssignAuthorAction={ false }>
authors
Expand All @@ -58,7 +58,7 @@ describe( 'PostAuthorCheck', () => {
expect( wrapper.type() ).toBe( null );
} );

it( 'should render control', () => {
it( 'should render control', () => {
const wrapper = shallow(
<PostAuthorCheck authors={ users } hasAssignAuthorAction={ true }>
authors
Expand Down
2 changes: 1 addition & 1 deletion editor/components/post-pending-status/test/check.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { shallow } from 'enzyme';
import { PostPendingStatusCheck } from '../check';

describe( 'PostPendingStatusCheck', () => {
it( 'should not render anything if the user doesn\'t have the right capabilities', () => {
it( "should not render anything if the user doesn't have the right capabilities", () => {
const wrapper = shallow(
<PostPendingStatusCheck hasPublishAction={ false }>
status
Expand Down
2 changes: 1 addition & 1 deletion editor/components/post-publish-panel/postpublish.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class PostPublishPanelPostpublish extends Component {
__( 'is now live.' );
const postPublishBodyText = isScheduled ?
__( 'The post address will be:' ) :
__( 'What\'s next?' );
__( "What's next?" );

return (
<div className="post-publish-panel__postpublish">
Expand Down
2 changes: 1 addition & 1 deletion editor/components/post-publish-panel/prepublish.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function PostPublishPanelPrepublish( {
return (
<div className="editor-post-publish-panel__prepublish">
<div><strong>{ hasPublishAction ? __( 'Are you ready to publish?' ) : __( 'Are you ready to submit for review?' ) }</strong></div>
<p>{ hasPublishAction ? __( 'Here, you can do a last-minute check up of your settings below, before you publish.' ) : __( 'When you\'re ready, submit your work for review, and an Editor will be able to approve it for you.' ) }</p>
<p>{ hasPublishAction ? __( 'Here, you can do a last-minute check up of your settings below, before you publish.' ) : __( "When you're ready, submit your work for review, and an Editor will be able to approve it for you." ) }</p>
{ hasPublishAction && (
<Fragment>
<PanelBody initialOpen={ false } title={ [
Expand Down
2 changes: 1 addition & 1 deletion editor/components/post-schedule/test/check.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { shallow } from 'enzyme';
import { PostScheduleCheck } from '../check';

describe( 'PostScheduleCheck', () => {
it( 'should not render anything if the user doesn\'t have the right capabilities', () => {
it( "should not render anything if the user doesn't have the right capabilities", () => {
const wrapper = shallow( <PostScheduleCheck hasPublishAction={ false } >yes</PostScheduleCheck> );
expect( wrapper.type() ).toBe( null );
} );
Expand Down
2 changes: 1 addition & 1 deletion editor/components/post-sticky/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe( 'PostSticky', () => {
expect( wrapper.type() ).toBe( null );
} );

it( 'should not render anything if post doesn\'t support stickying', () => {
it( "should not render anything if post doesn't support stickying", () => {
const wrapper = shallow(
<PostStickyCheck postType="post" hasStickyAction={ false }>
Can Toggle Sticky
Expand Down
2 changes: 1 addition & 1 deletion editor/components/post-visibility/test/check.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { PostVisibilityCheck } from '../check';
describe( 'PostVisibilityCheck', () => {
const render = ( { canEdit } ) => ( canEdit ? 'yes' : 'no' );

it( 'should not render the edit link if the user doesn\'t have the right capability', () => {
it( "should not render the edit link if the user doesn't have the right capability", () => {
const wrapper = shallow( <PostVisibilityCheck hasPublishAction={ false } render={ render } /> );
expect( wrapper.text() ).toBe( 'no' );
} );
Expand Down
2 changes: 1 addition & 1 deletion editor/components/template-validation-notice/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function TemplateValidationNotice( { isValid, ...props } ) {

return (
<Notice className="editor-template-validation-notice" isDismissible={ false } status="warning">
<p>{ __( 'The content of your post doesn\'t match the template assigned to your post type.' ) }</p>
<p>{ __( "The content of your post doesn't match the template assigned to your post type." ) }</p>
<div>
<Button isDefault onClick={ props.resetTemplateValidity }>{ __( 'Keep it as is' ) }</Button>
<Button onClick={ confirmSynchronization } isPrimary>{ __( 'Reset the template' ) }</Button>
Expand Down
6 changes: 3 additions & 3 deletions editor/components/theme-support-check/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { shallow } from 'enzyme';
import { ThemeSupportCheck } from '../index';

describe( 'ThemeSupportCheck', () => {
it( 'should not render if there\'s no support check provided', () => {
it( "should not render if there's no support check provided", () => {
const wrapper = shallow( <ThemeSupportCheck>foobar</ThemeSupportCheck> );
expect( wrapper.type() ).toBe( null );
} );
Expand Down Expand Up @@ -37,7 +37,7 @@ describe( 'ThemeSupportCheck', () => {
expect( wrapper.type() ).not.toBe( null );
} );

it( 'should not render if post-thumbnails aren\'t supported for the post type', () => {
it( "should not render if post-thumbnails aren't supported for the post type", () => {
const themeSupports = {
'post-thumbnails': [ 'post' ],
};
Expand All @@ -61,7 +61,7 @@ describe( 'ThemeSupportCheck', () => {
expect( wrapper.type() ).toBe( null );
} );

it( 'should not render if theme doesn\'t support post-thumbnails', () => {
it( "should not render if theme doesn't support post-thumbnails", () => {
const themeSupports = {
'post-thumbnails': false,
};
Expand Down
2 changes: 1 addition & 1 deletion editor/store/test/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1968,7 +1968,7 @@ describe( 'state', () => {
} );
} );

it( 'should update the shared block\'s id if it was temporary', () => {
it( "should update the shared block's id if it was temporary", () => {
const initialState = {
data: {
shared1: { clientId: '', title: '' },
Expand Down
4 changes: 2 additions & 2 deletions editor/store/test/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ describe( 'selectors', () => {
} );

describe( 'getEditedPostAttribute', () => {
it( 'should return the current post\'s slug if no edits have been made', () => {
it( "should return the current post's slug if no edits have been made", () => {
const state = {
currentPost: { slug: 'post slug' },
editor: {
Expand Down Expand Up @@ -3870,7 +3870,7 @@ describe( 'selectors', () => {
} );
} );

it( 'should return undefined if settings for the block don\'t exist', () => {
it( "should return undefined if settings for the block don't exist", () => {
const state = {
blockListSettings: {},
};
Expand Down
2 changes: 1 addition & 1 deletion packages/api-fetch/src/middlewares/test/http-v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe( 'HTTP v1 Middleware', () => {
httpV1Middleware( { method: 'PUT', data: {} }, callback );
} );

it( 'shouldn\'t touch the options for GET requests', () => {
it( "shouldn't touch the options for GET requests", () => {
expect.hasAssertions();

const requestOptions = { method: 'GET', path: '/wp/v2/posts' };
Expand Down
8 changes: 4 additions & 4 deletions packages/blocks/src/api/test/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ describe( 'block parser', () => {
} );

describe( 'parseWithAttributeSchema', () => {
it( 'should return the matcher\'s attribute value', () => {
it( "should return the matcher's attribute value", () => {
const value = parseWithAttributeSchema(
'<div>chicken</div>',
{
Expand Down Expand Up @@ -216,7 +216,7 @@ describe( 'block parser', () => {
expect( value ).toBe( 10 );
} );

it( 'should return the matcher\'s attribute value', () => {
it( "should return the matcher's attribute value", () => {
const value = getBlockAttribute(
'content',
{
Expand Down Expand Up @@ -571,7 +571,7 @@ describe( 'block parser', () => {
} );

const parsed = parse(
'<!-- wp:core/test-block {"smoked":"yes","url":"http://google.com","chicken":"ribs & \'wings\'"} -->' +
`<!-- wp:core/test-block {"smoked":"yes","url":"http://google.com","chicken":"ribs & 'wings'"} -->` +
'Brisket' +
'<!-- /wp:core/test-block -->'
);
Expand All @@ -582,7 +582,7 @@ describe( 'block parser', () => {
content: 'Brisket',
smoked: 'yes',
url: 'http://google.com',
chicken: 'ribs & \'wings\'',
chicken: "ribs & 'wings'",
} );
expect( typeof parsed[ 0 ].clientId ).toBe( 'string' );
} );
Expand Down
2 changes: 1 addition & 1 deletion packages/blocks/src/api/test/serializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ describe( 'block serializer', () => {
} );

describe( 'getBlockContent', () => {
it( 'should return the block\'s serialized inner HTML', () => {
it( "should return the block's serialized inner HTML", () => {
const blockType = {
attributes: {
content: {
Expand Down
4 changes: 2 additions & 2 deletions packages/blocks/src/api/test/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe( 'templates', () => {
expect( doBlocksMatchTemplate( blockList, template ) ).toBe( true );
} );

it( 'return false if the template length doesn\'t match the blocks length', () => {
it( "return false if the template length doesn't match the blocks length", () => {
const template = [
[ 'core/test-block' ],
[ 'core/test-block-2' ],
Expand All @@ -86,7 +86,7 @@ describe( 'templates', () => {
expect( doBlocksMatchTemplate( blockList, template ) ).toBe( false );
} );

it( 'return false if the nested template doesn\'t match the blocks', () => {
it( "return false if the nested template doesn't match the blocks", () => {
const template = [
[ 'core/test-block' ],
[ 'core/test-block-2', {}, [
Expand Down
4 changes: 2 additions & 2 deletions packages/blocks/src/api/test/validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ describe( 'validation', () => {
it( 'returns true if the same style', () => {
const isEqual = isEqualAttributesOfName.style(
'background-image: url( "https://wordpress.org/img.png" ); color: red;',
'color: red; background-image: url(\'https://wordpress.org/img.png\n);'
"color: red; background-image: url('https://wordpress.org/img.png\n);"
);

expect( isEqual ).toBe( true );
Expand All @@ -186,7 +186,7 @@ describe( 'validation', () => {
it( 'returns false if not same style', () => {
const isEqual = isEqualAttributesOfName.style(
'background-image: url( "https://wordpress.org/img.png" ); color: red;',
'color: red; font-size: 13px; background-image: url(\'https://wordpress.org/img.png\');'
"color: red; font-size: 13px; background-image: url('https://wordpress.org/img.png');"
);

expect( isEqual ).toBe( false );
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/autocomplete/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ describe( 'Autocomplete', () => {
} );
} );

it( 'doesn\'t otherwise interfere with keydown behavior', ( done ) => {
it( "doesn't otherwise interfere with keydown behavior", ( done ) => {
const wrapper = makeAutocompleter( [ slashCompleter ] );
// listen to keydown events on the editor to see if it gets them
const editorKeydown = jest.fn();
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/disabled/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ describe( 'Disabled', () => {
}
}

test( 'lets components know that they\'re disabled via context', () => {
test( "lets components know that they're disabled via context", () => {
const wrapper = TestUtils.renderIntoDocument( <Disabled><DisabledStatus /></Disabled> );
const wrapperElement = TestUtils.findRenderedDOMComponentWithTag( wrapper, 'p' );
expect( wrapperElement.textContent ).toBe( 'Disabled' );
} );

test( 'lets components know that they\'re not disabled via context', () => {
test( "lets components know that they're not disabled via context", () => {
const wrapper = TestUtils.renderIntoDocument( <DisabledStatus /> );
const wrapperElement = TestUtils.findRenderedDOMComponentWithTag( wrapper, 'p' );
expect( wrapperElement.textContent ).toBe( 'Not disabled' );
Expand Down
Loading

0 comments on commit 2d10143

Please sign in to comment.