Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Merge pull request #197 from ckeditor/t/193
Browse files Browse the repository at this point in the history
Fix: Removed a period at the end of an error message because some browsers included the period in links to errors. Closes #193.
  • Loading branch information
Reinmar authored Nov 9, 2017
2 parents ab11565 + c0dc863 commit fdebc2f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/ckeditorerror.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,5 @@ export function attachLinkToDocumentation( message ) {
return message;
}

return message + ` Read more: ${ DOCUMENTATION_URL }#${ matchedErrorName[ 1 ] }.\n`;
return message + ` Read more: ${ DOCUMENTATION_URL }#${ matchedErrorName[ 1 ] }\n`;
}
4 changes: 2 additions & 2 deletions tests/ckeditorerror.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe( 'CKEditorError', () => {
const error = new CKEditorError( 'model-schema-no-item: Specified item cannot be found.' );

const errorMessage = 'model-schema-no-item: Specified item cannot be found. ' +
`Read more: ${ DOCUMENTATION_URL }#model-schema-no-item.\n`;
`Read more: ${ DOCUMENTATION_URL }#model-schema-no-item\n`;

expect( error ).to.have.property( 'message', errorMessage );
} );
Expand All @@ -65,7 +65,7 @@ describe( 'CKEditorError', () => {
const error = new CKEditorError( 'model-schema-no-item: Specified item cannot be found.', { foo: 1, bar: 2 } );

const errorMessage = 'model-schema-no-item: Specified item cannot be found. ' +
`Read more: ${ DOCUMENTATION_URL }#model-schema-no-item.\n ` +
`Read more: ${ DOCUMENTATION_URL }#model-schema-no-item\n ` +
'{"foo":1,"bar":2}';

expect( error ).to.have.property( 'message', errorMessage );
Expand Down
4 changes: 2 additions & 2 deletions tests/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe( 'log', () => {
log.warn( 'model-schema-no-item: Specified item cannot be found.' );

const logMessage = 'model-schema-no-item: Specified item cannot be found. ' +
`Read more: ${ DOCUMENTATION_URL }#model-schema-no-item.\n`;
`Read more: ${ DOCUMENTATION_URL }#model-schema-no-item\n`;

sinon.assert.calledOnce( spy );
sinon.assert.calledWith( spy, logMessage );
Expand Down Expand Up @@ -66,7 +66,7 @@ describe( 'log', () => {
log.error( 'model-schema-no-item: Specified item cannot be found.' );

const logMessage = 'model-schema-no-item: Specified item cannot be found. ' +
`Read more: ${ DOCUMENTATION_URL }#model-schema-no-item.\n`;
`Read more: ${ DOCUMENTATION_URL }#model-schema-no-item\n`;

sinon.assert.calledOnce( spy );
sinon.assert.calledWith( spy, logMessage );
Expand Down

0 comments on commit fdebc2f

Please sign in to comment.