Code within a list - formatting is bad
Migrated issue
Reported by: jhodgdon
Thanks to pounard for pointing this out in IRC today!
When you have code within a list within an @return/@param, the formatting gets a bit screwed up.
Example -- from hook_theme() in Drupal 7/8 as it is currently (abbreviated)
* @return array
* An associative array of theme hook information:
* - pattern: A regular expression pattern to be used to allow this theme
* implementation to have a dynamic name. The convention is to use __ to
* differentiate the dynamic portion of the theme. For example, to allow
* forums to be themed individually, the pattern might be: 'forum__'. Then,
* when the forum is themed, call:
* @code
* theme(array('forum__' . $tid, 'forum'), $forum)
* @endcode
* - preprocess functions: A list of functions used to preprocess this data.
This results in a page that looks like the attached screen shot. Note that the whole code section should be part of the list (it isn't indented and is outside the UL/LI in the HTML), and the closing ?> is indented farther than it should be.
I tried today on my test site, and if the code is modified so it is all on one line:
* @code theme(array('forum__' . $tid, 'forum'), $forum) @endcodeyou get the second attached screen shot (somewhat better but still the code section is not part of the list).
Pre-migration files
Edited by drupalbot