Making WordPress.org

Opened 7 years ago

Closed 7 years ago

#2842 closed defect (bug) (fixed)

REST API handbook contains incorrect links to Requests class

Reported by: rmccue's profile rmccue Owned by: coffee2code's profile coffee2code
Milestone: Priority: normal
Component: Developer Hub Keywords:
Cc:

Description

Not sure where the code is that auto-links classes used in text, but for the REST API handbook, when Requests is used in the text (case-sensitively), it's linked to the Requests class.

This is most visible in the broken Requests section header on the handbook's homepage.

This code is in the DevHub_Formatting::autolink_references code, but is explicitly included there, so this seems intentional.

Since "requests" is both the name of the class and a common English word, IMO this should err on the most common case, which is as an English word. References to the class itself can be manually linked by the page author.

Change History (1)

#1 @coffee2code
7 years ago

  • Owner set to coffee2code
  • Resolution set to fixed
  • Status changed from new to closed

In 5595:

developer.wordpress.org: Prevent 'Requests' and 'Translations' from being treated as inline class references.

Unlike other class names, 'Requests' and 'Translations' have a decent chance of being used as actual words and not just inline class references, so err on the side of caution. If a class reference is intended for these two class names, the @see notation should be used, e.g. {@see Requests}.

Fixes #2842.

Note: See TracTickets for help on using tickets.