Opened 8 years ago

Closed 8 years ago

#1730 closed defect (bug) (fixed)

Fix auto-linking of inline @see tags for dynamic hooks.

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


As spotted by @DrewAPicture, dynamic hooks referenced via inline@see tags are not linked properly.

For example: contains a generated URL for the $type_template dynamic hook of:‘$type_template’

The URL should be:

The issue stems from the presence of the $ in dynamic hooks, which causes the current link_internal_element() regex for hooks to fail, leading to the fallback conditional block (which is meant to handle functions) to be executed. This is the reason the bad URL is pointing to /functions/ and not /hooks/.

And, obviously, the proper link should also be sanitized to remove the $, ‘, and ’.

Change History (1)

#1 @coffee2code
8 years ago

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

In 3233: Fix auto-linking of inline @see tags for dynamic hooks.

  • Fix regex for hooks in link_internal_element () to allow $.
  • Remove $ and encoded quotes from hook slug in URL.
  • Don't capture encoded quotes in match for slug, saving the need to remove them.

Fixes #1730.

Note: See TracTickets for help on using tickets.