API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Component%21Rend...

On protected static function FormattableMarkup::placeholderFormat, there are a couple issues with the %variable placeholders section.

The example code has the following line:

$arguments = ['output_text' => 'text output here.'];

Should be this (missing %):

$arguments = ['%output_text' => 'text output here.'];

The html example looks like this:

<em class="placeholder">text output here.em>

Should look like this:

<em class="placeholder">text output here.</em>

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

badjava created an issue. See original summary.

badjava’s picture

Looks like the html example was fixed already but the placeholder was not. Here is a patch for the first issue.

chiranjeeb2410’s picture

Assigned: Unassigned » chiranjeeb2410
chiranjeeb2410’s picture

Added the missing " % " to the argument placeholder.

chiranjeeb2410’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 4: 2839951-3.patch, failed testing.

badjava’s picture

Assigned: chiranjeeb2410 » Unassigned
Status: Needs work » Needs review

@chiranjeeb2410 Thanks for setting to needs review but the patch I already submitted is fine. I am removing patch #4 as it is incorrect and doesn't add anything new.

JayKandari’s picture

Status: Needs review » Reviewed & tested by the community

#2 Looks good.
Patch file has the updated code as described in Issue Description.
Changing status to RTBC.

chiranjeeb2410’s picture

#4 was unnecessary though. Anyways #2 works just fine. Closing the issue as of now.

chiranjeeb2410’s picture

Status: Reviewed & tested by the community » Fixed
cilefen’s picture

Status: Fixed » Reviewed & tested by the community

@chiranjeeb2410 Code must be committed to the codebase in order for this issue to be fixed.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed c250a53 to 8.3.x and b093322 to 8.2.x. Thanks!

  • alexpott committed c250a53 on 8.3.x
    Issue #2839951 by chiranjeeb2410, badjava: API docs FormattableMarkup::...

  • alexpott committed b093322 on 8.2.x
    Issue #2839951 by chiranjeeb2410, badjava: API docs FormattableMarkup::...

Status: Fixed » Closed (fixed)

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