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.)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kiamlaluno created an issue. See original summary.

apaderno’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

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.

apaderno’s picture

apaderno’s picture

Status: Needs work » Needs review
apaderno’s picture

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.

apaderno’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."

apaderno’s picture

Title: Fix a typo in theme.api.php » Improve description of render array properties and examples
FileSize
3.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
FileSize
3.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

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.