From 89567988cf5f4effda5ab28aed6a5a41c0b6b177 Mon Sep 17 00:00:00 2001 From: Wilson Lin Date: Sun, 5 Jan 2020 14:07:31 +1100 Subject: [PATCH] Clear up wording --- README.md | 10 ++++++---- notes/Text script content.md | 17 +---------------- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index b3563e1..90e5383 100644 --- a/README.md +++ b/README.md @@ -286,13 +286,15 @@ These elements are usually like content elements but are occasionally used like ### Attributes -Any entities in attribute values are decoded, and then the most optimal representation is calculated and used: +Any entities in attribute values are decoded, and then the shortest representation of the value is calculated and used: - Double quoted, with any `"` encoded. - Single quoted, with any `'` encoded. - Unquoted, with `"`/`'` first character (if applicable), `>` last character (if applicable), and any whitespace encoded. -Some attributes have their whitespace (after decoding) trimmed and collapsed, such as `class`. +Some attributes have their whitespace (after any decoding) trimmed and collapsed: + +- `class` If an attribute value is empty after any processing, it is completely removed (i.e. no `=`). @@ -337,12 +339,12 @@ No ampersand can immediately follow a malformed entity e.g. `&am&`, `&&`, or `&& ### Attributes -Backticks (`` ` ``) are not valid quote marks and are not interpreted as such. +Backticks (`` ` ``) are not valid quote marks and not interpreted as such. However, backticks are valid attribute value quotes in Internet Explorer. It is an error if there is: -- whitespace between `=` and attribute names/values; +- whitespace between `=` and an attribute name/value; - no whitespace before an attribute; and/or - an unquoted attribute value. diff --git a/notes/Text script content.md b/notes/Text script content.md index b0f8147..91849d6 100644 --- a/notes/Text script content.md +++ b/notes/Text script content.md @@ -12,7 +12,7 @@ ``` These are true about the above snippet: - `document.querySelectorAll('script').length === 2`. -- `!exec1 && exec2`. +- `!window.exec1 && window.exec2`. - `document.querySelector('script[type="text/html"]')` has exactly one child node and it's a text node. ## Comments @@ -108,18 +108,3 @@ Main closing tag works because it is not in a comment. ``` - -Figure this out: - -```html - - alert(); - - -

Test

-```