Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(773)

Unified Diff: sky/specs/parsing.md

Issue 733313003: Specs: Make </> automatically close the last open tag, so you don't have to repeat yourself all the… (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/specs/markup.md ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/specs/parsing.md
diff --git a/sky/specs/parsing.md b/sky/specs/parsing.md
index 4063379682ab378707798b57c75f48ebad5f0cf4..6d76a4881bacc0b8b42d5eca85c4ebbe9281ba45 100644
--- a/sky/specs/parsing.md
+++ b/sky/specs/parsing.md
@@ -8,10 +8,11 @@ Parsing in Sky is a strict pipeline consisting of five stages:
- normalising, which manipulates the sequence of characters.
-- tokenising, which converts these characters into three kinds of
- tokens: character tokens, start tag tokens, and end tag tokens.
- Character tokens have a single character value. Tag tokens have a
- tag name, and a list of name/value pairs known as attributes.
+- tokenising, which converts these characters into four kinds of
+ tokens: character tokens, start tag tokens, end tag tokens, and
+ automatic end tag tokens. Character tokens have a single character
+ value. Start and end tag tokens have a tag name, and a list of
+ name/value pairs known as attributes.
- token cleanup, which converts sequences of character tokens into
string tokens, and removes duplicate attributes in tag tokens.
@@ -371,8 +372,8 @@ If the current character is...
If the current character is...
-* '``>``': Emit character tokens for '``</>``'. Consume the current
- character. Switch to the **data** state.
+* '``>``': Emit an automatic end tag token. Switch to the **data**
+ state.
* '``0``'..'``9``', '``a``'..'``z``', '``A``'..'``Z``',
'``-``', '``_``', '``.``': Create an end tag token, let its
@@ -552,10 +553,10 @@ If the current character is...
Emit the tag token.
If the tag token was a start tag token and the tag name was
-'``script``', then and switch to the **script raw data** state.
+'``script``', then switch to the **script raw data** state.
If the tag token was a start tag token and the tag name was
-'``style``', then and switch to the **style raw data** state.
+'``style``', then switch to the **style raw data** state.
Otherwise, switch to the **data** state.
@@ -832,5 +833,7 @@ _document_:
modules_ contains no entries with unresolved promises, then
execute the script given by the element's contents, using the
associated names as appropriate.
+ - If _token_ is an automatic end tag token:
+ 1. Pop the top node from the _stack of open nodes_, if any.
4. Yield until _imported modules_ has no promises.
5. Fire a ``load`` event at the _parsing context_ object.
« no previous file with comments | « sky/specs/markup.md ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698