API page: https://api.drupal.org/api/drupal/core%21includes%21theme.inc/function/t...
There are 3 mentions of HTML tags in this text, all of which different:
url: (optional) The url object to link to. If omitted, no a tag is printed out.
attributes: (optional) Attributes for the anchor, or for the <span> tag used in its place if no 'href' is supplied. If element 'class' is included, it must be an array of one or more class names.
If the 'href' element is supplied, the entire link array is passed to l() as its $options parameter.
attributes: A keyed array of attributes for the UL containing the list of links.
- "no a tag" is really confusing, because the 'a' just looks like the word 'a'.
- "the <span> tag" is using angle brackets to mention a tag.
- "A keyed array of attributes for the UL containing" is using no angle brackets, but capitals to mention a tag.
Comments
Comment #2
jhodgdonI suggest that all of them use UPPER_CASE for the tag names.
Comment #3
pushpinderchauhan commentedPlease review.
Comment #4
jhodgdonThanks for the patch! Notes:
This is a good way to change this line, because the rest of the text refers to "anchor" as well.
We should either say
<span>orSPANbut not<SPAN>. Sorry I was not clear. I guess<span>is probably the best, and the API module seems to handle it OK.See previous note.
Comment #5
pushpinderchauhan commentedThanks jhodgdon! Please take a look again.
Comment #6
joachim commented> I guess is probably the best, and the API module seems to handle it OK.
Should that be added to the documentation standards?
Comment #7
dimaro commented@joachim Maybe we need use all space in this line?
Comment #8
jhodgdonRE #6, if you want to add to the coding standards or docs standards, see
https://www.drupal.org/project/coding_standards
There is a process. It actually kind of works now. But we can't just go editing the page.
And yes, we could do a slightly better job of wrapping (see #7).
If we are fixing this line, could we also change
The url object => the (full namespace of the Url class) object
Comment #9
dimaro commentedApply changes commented above on #7 and #8.
Comment #10
joachim commentedComment #11
jhodgdonThis looks good, thanks! Except:
I am pretty sure that this is a Url object, not a Link object?
Comment #12
dimaro commentedI don't know what I was thinking!... My apologies.
Comment #13
jhodgdonThanks! Looks fine to me.
Comment #14
dimaro commentedI have been working in this issue at DrupalCamp Spain.
Tagging this issue.
Comment #15
alexpottCommitted c9750a3 and pushed to 8.1.x and 8.2.x. Thanks!