API page: https://api.drupal.org/api/drupal/core%21modules%21system%21core.api.php...

Enter a descriptive title (above) relating to Entity API, then describe the problem you have found:

This page has a formatting problem -- it looks like there is a missing @endcode after a code block where it says:

$query = $query_service->getAggregate('your_entity_type');
Also, you should use dependency injection to get this object if...

So we just need a quick patch to add a line saying
@endcode
after the code block ends.

This page is generated from file core/modules/system/core.api.php where it says:

@defgroup entity_api

Files: 
CommentFileSizeAuthor
#1 drupal8-missing-endcode-2301837-1.patch559 byteser.pushpinderrana
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 73,156 pass(es). View

Comments

er.pushpinderrana’s picture

Status: Active » Needs review
FileSize
559 bytes
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 73,156 pass(es). View

Fixed formatting issue, added @endcode after the block code ends. Please review attached patch.

Enter a descriptive title (above) relating to Entity API, then describe the problem you have found:

Not sure about this.

Elijah Lynn’s picture

Status: Needs review » Reviewed & tested by the community

I reviewed the patch and it looks like it should work but I don't know how to actually test that the parser will work correctly. Plus I wasn't sure if there should be a blank line after @endcode but based on the docs here https://www.drupal.org/coding-standards/docs#code there shouldn't be a blank line after @endcode, which is what you did and is good!

Drupal standards: Put the @code and @endcode tags on their own lines. Do not use a blank line between the text that explains the code sample and the code sample itself.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 821da69 and pushed to 8.x. Thanks!

  • alexpott committed 821da69 on 8.x
    Issue #2301837 by er.pushpinderrana | jhodgdon: Fixed Missing @endcode...
jhodgdon’s picture

Thanks all!

Status: Fixed » Closed (fixed)

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