| OLD | NEW |
| 1 Parsing | 1 Parsing |
| 2 ======= | 2 ======= |
| 3 | 3 |
| 4 Parsing in Sky is a strict pipeline consisting of five stages: | 4 Parsing in Sky is a strict pipeline consisting of five stages: |
| 5 | 5 |
| 6 - decoding, which converts incoming bytes into Unicode characters | 6 - decoding, which converts incoming bytes into Unicode characters |
| 7 using UTF-8. | 7 using UTF-8. |
| 8 | 8 |
| 9 - normalising, which manipulates the sequence of characters. | 9 - normalising, which manipulates the sequence of characters. |
| 10 | 10 |
| (...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 762 ------------------- | 762 ------------------- |
| 763 | 763 |
| 764 Replace each sequence of character tokens with a single string token | 764 Replace each sequence of character tokens with a single string token |
| 765 whose value is the concatenation of all the characters in the | 765 whose value is the concatenation of all the characters in the |
| 766 character tokens. | 766 character tokens. |
| 767 | 767 |
| 768 For each start tag token, remove all but the first name/value pair for | 768 For each start tag token, remove all but the first name/value pair for |
| 769 each name (i.e. remove duplicate attributes, keeping only the first | 769 each name (i.e. remove duplicate attributes, keeping only the first |
| 770 one). | 770 one). |
| 771 | 771 |
| 772 TODO(ianh): maybe sort the attributes? |
| 773 |
| 772 For each end tag token, remove the attributes entirely. | 774 For each end tag token, remove the attributes entirely. |
| 773 | 775 |
| 774 If the token is a start tag token, notify the JavaScript token stream | 776 If the token is a start tag token, notify the JavaScript token stream |
| 775 callback of the token. | 777 callback of the token. |
| 776 | 778 |
| 777 Then, pass the tokens to the tree construction stage. | 779 Then, pass the tokens to the tree construction stage. |
| 778 | 780 |
| 779 | 781 |
| 780 Tree construction stage | 782 Tree construction stage |
| 781 ----------------------- | 783 ----------------------- |
| (...skipping 27 matching lines...) Expand all Loading... |
| 809 there isn't one, skip this token. | 811 there isn't one, skip this token. |
| 810 2. If there's a ``template`` element in the _stack of open | 812 2. If there's a ``template`` element in the _stack of open |
| 811 nodes_ above _node_, then skip this token. | 813 nodes_ above _node_, then skip this token. |
| 812 3. Pop nodes from the _stack of open nodes_ until _node_ has been | 814 3. Pop nodes from the _stack of open nodes_ until _node_ has been |
| 813 popped. | 815 popped. |
| 814 4. If _node_'s tag name is ``script``, then yield until there | 816 4. If _node_'s tag name is ``script``, then yield until there |
| 815 are no pending import loads, then execute the script given by | 817 are no pending import loads, then execute the script given by |
| 816 the element's contents. | 818 the element's contents. |
| 817 3. Yield until there are no pending import loads. | 819 3. Yield until there are no pending import loads. |
| 818 3. Fire a ``load`` event at the _parsing context_ object. | 820 3. Fire a ``load`` event at the _parsing context_ object. |
| OLD | NEW |