There's an extra ' in the following code. I'm about to write a patch for it.

/**
 * Plugin implementation of the 'text_trimmed'' formatter.
 *
 * Note: This class also contains the implementations used by the
 * 'text_summary_or_trimmed' formatter.
 *
 * @see \Drupal\text\Field\Formatter\TextSummaryOrTrimmedFormatter
 *
 * @FieldFormatter(
 *   id = "text_trimmed",
 *   label = @Translation("Trimmed"),
 *   field_types = {
 *     "text",
 *     "text_long",
 *     "text_with_summary"
 *   },
 *   quickedit = {
 *     "editor" = "form"
 *   }
 * )
 */

Comments

andileco’s picture

StatusFileSize
new605 bytes

Took out the extra '. This is my first patch!

pushpinderchauhan’s picture

Status: Active » Needs review
StatusFileSize
new660 bytes

@andile2012 welcome, Good caught. Thanks!

In your patch some extra spaces coming, it should be removed. Here is updated patch.

One more thing, once you upload any patch then also change Status to Need review.

Thanks :)

andileco’s picture

Thanks, @er.pushpinderrana. When I ran "git diff 8.x > [description]-[issue-number]-[comment-number].patch" (was using git bash on a Windows machine) it created an empty patch file, so I manually added the text--am sure that's what introduced the extra spaces. Thanks for the other note, too!

pushpinderchauhan’s picture

@andile2012, please read the instructions here Making a Drupal patch with Git and follow the same in future.

so I manually added the text--am sure that's what introduced the extra spaces.

You can't make manual changes in .patch file, it is not going to be work. Make sure you first apply your patch on your machine, see the patch apply successfully then upload.

Thanks!

andileco’s picture

I went back and played around and my checkout had failed--that was why the patch was blank. Good to know! Thanks for the pointers.

pushpinderchauhan’s picture

Sorry but why you hide the #2. This patch will get reviewed by community as it applies successfully.

PS: We hide only that patch having some issues and no need to review further.

andileco’s picture

Rookie mistake :(

pushpinderchauhan’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me, moving to RTBC.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed fe76b9a and pushed to 8.x. Thanks!

  • alexpott committed fe76b9a on 8.x
    Issue #2292221 by er.pushpinderrana, andile2012: Fixed Remove extra ' in...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.