API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21...

The description for #markup contains the following sentence. (Emphasis is mine.)

Aternatively, you can use the render array key #allowed_tags to alter which tags are filtered.

It should be Alternatively.

Also, let's fix this sentence. (I added the <code> tags for showing the code here.)

(I.e, <script> and <style> are not allowed.)

I.e should eventually be I.e., but I would rather use For example, since the list of filtered tags is probably not exhaustive.

(For example, @code <script> @endcode and @code <style> @endcode are not allowed.)

Comments

kiamlaluno created an issue. See original summary.

avpaderno’s picture

Issue summary: View changes
cilefen’s picture

Title: Fix a typo in the documentation » Fix a typo in theme.api.php
Issue tags: +Novice
pguillard’s picture

Status: Active » Needs review
StatusFileSize
new1.15 KB
new545 bytes

Both typos fixed. For the second one, we had #2637336: Replace i.e. and e.g. with English words in /core/includes and /core/misc directory, still in standby

pguillard’s picture

Oops, I guess we posted same response at the same time..

Status: Needs review » Needs work

The last submitted patch, 4: fix_code_example_in-2776779-2.patch, failed testing.

avpaderno’s picture

StatusFileSize
new1.5 KB
avpaderno’s picture

Status: Needs work » Needs review
avpaderno’s picture

StatusFileSize
new1.48 KB

I have also fixed a too verbose sentence, other than fixing a line overflow in my previous patch. The previous one also fixed a missing indeterminate article.

avpaderno’s picture

+++ b/core/lib/Drupal/Core/Render/theme.api.php
@@ -277,12 +277,12 @@
+ *   implement a theme hook and a template file and/or an asset library.

Also, since in Drupal 8 there are just theme hooks using template files, this phrase can be shortened to "implement a theme hook and/or an asset library."

avpaderno’s picture

Title: Fix a typo in theme.api.php » Improve description of render array properties and examples
StatusFileSize
new3.54 KB

Let's make it more generic, since there isn't just a typo to correct; there is also the punctuation to correct, and some sentences to make more coincise. Also, the example shows how to allow a tag that is already whitelisted; it should show how to allow a tag that is otherwise filtered out.

Eda’s picture

Status: Needs review » Needs work

+ * type of "render element" (for example 'form', for an HTML form; 'textfield',

Needs a comma after "(for example...", like:

* type of "render element" (for example, 'form', for an HTML form; 'textfield',

Eda’s picture

Status: Needs work » Needs review
StatusFileSize
new3.57 KB

Fix the comma and remove the word "three" as there were more properties listed, not 3.

arunkumark’s picture

Status: Needs review » Reviewed & tested by the community

The patch #13 is working fine.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 13: improve-documentation-2781927-13.patch, failed testing.

pguillard’s picture

Status: Needs work » Needs review
kiwimind’s picture

Status: Needs review » Needs work
+++ b/core/lib/Drupal/Core/Render/theme.api.php
@@ -254,11 +254,11 @@
+ *   type of "render element" (for example, 'form', for an HTML form; 'textfield',

Line length exceeds 80 characters.

pguillard’s picture

StatusFileSize
new3.82 KB
new1.13 KB

Corrected, thanks

kiwimind’s picture

Status: Needs work » Needs review
kiwimind’s picture

Status: Needs review » Reviewed & tested by the community

Cool, passed, in which case, all looks good so have a RTBC.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

This is an improvement and nothing is wrong with any of the changes. Also as a docs fix this can be backported to 8.2.x.

Committed and pushed aa03660 to 8.3.x and 1656c67 to 8.2.x. Thanks!

  • alexpott committed aa03660 on 8.3.x
    Issue #2781927 by pguillard, kiamlaluno, Eda, kiwimind: Improve...

  • alexpott committed 1656c67 on 8.2.x
    Issue #2781927 by pguillard, kiamlaluno, Eda, kiwimind: Improve...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.