#1461 closed defect (bug) (invalid)
Code Reference parser treats indents in docblocks as blockquotes
Reported by: | morganestes | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Developer Hub | Keywords: | has-screenshots needs-patch close |
Cc: |
Description
When a function docblock has indented lines in the parameter descriptions, the parser treats those as blockquote indentations, throwing off the view of the Developer Resources page.
Example: https://developer.wordpress.org/reference/functions/get_post_type_labels/ pulls from https://core.trac.wordpress.org/browser/tags/4.4/src/wp-includes/post.php#L1310, which makes some of the parameters break on when viewing the docs.
Change History (4)
This ticket was mentioned in Slack in #docs by morganestes. View the logs.
9 years ago
#3
follow-up:
↓ 4
@
9 years ago
I understand the reason for the indentation inside the docblock;
Sure, the "free" unordered list is great, but there are some other issues with the formatting here. Not sure if each one needs a separate ticket, but here's a few just on this page:
- Ignoring the inline
@link
inside 'add_new' description - Comment straight quotes converted to "smart" quotes
- Missing parameter names and descriptions: 'filter_items_list', 'items_list_navigation', 'items_list'
#4
in reply to:
↑ 3
@
9 years ago
Replying to morganestes:
I understand the reason for the indentation inside the docblock;
Sure, the "free" unordered list is great, but there are some other issues with the formatting here. Not sure if each one needs a separate ticket, but here's a few just on this page:
- Ignoring the inline
@link
inside 'add_new' description- Comment straight quotes converted to "smart" quotes
- Missing parameter names and descriptions: 'filter_items_list', 'items_list_navigation', 'items_list'
All valid points and issues, but not related to indentation :-)
Feel free to create separate tickets.
In this particular case, I think the line is being incorrectly wrapped and indented. And in fact, I removed the indentation in [wp35868]. The fact that parsedown is correctly turning this formatted content into an unordered list is something I would consider "getting for free". As such, suggest wontfix.