/[suikacvs]/markup/html/scripting-parser/parser.html
Suika

Diff of /markup/html/scripting-parser/parser.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by wakaba, Sun Apr 20 12:19:13 2008 UTC revision 1.5 by wakaba, Fri Apr 25 11:40:56 2008 UTC
# Line 77  Line 77 
77          return '';          return '';
78        });        });
79        if (token) return token;        if (token) return token;
80          var m;
81          if ((p.insertionPoint < '</script'.length) &&
82              (m = i.s.match (/^<\/([SCRIPTscript]+)/))) {
83            var v = m[1].substring (0, p.insertionPoint).toLowerCase ();
84            if (v == 'script'.substring (0, p.insertionPoint - '</'.length)) {
85              return {type: 'abort'};
86            }
87          }
88        i.s = i.s.replace (/^</,        i.s = i.s.replace (/^</,
89        function (s) {        function (s) {
90          token = {type: 'char', value: s};          token = {type: 'char', value: s};
# Line 88  Line 96 
96      }      }
97    
98      var token;      var token;
99      i.s = i.s.replace (/^<\/([^>]+)>/, function (s, e) {      i.s = i.s.replace (/^<\/([^>]+)(?:>|$)/, function (s, e) {
100        if (p.insertionPoint < s.length) {        if (p.insertionPoint < s.length ||
101              (p.insertionPoint <= s.length &&
102               s.substring (s.length - 1, 1) != '>')) {
103          token = {type: 'abort'};          token = {type: 'abort'};
104          return s;          return s;
105        }        }
# Line 98  Line 108 
108        return '';        return '';
109      });      });
110      if (token) return token;      if (token) return token;
111      i.s = i.s.replace (/^<([^>]+)>/, function (s, e) {      i.s = i.s.replace (/^<([^>]+)(?:>|$)/, function (s, e) {
112        if (p.insertionPoint < s.length) {        if (p.insertionPoint < s.length ||
113              (p.insertionPoint <= s.length &&
114               s.substring (s.length - 1, 1) != '>')) {
115          token = {type: 'abort'};          token = {type: 'abort'};
116          return s;          return s;
117        }        }
# Line 212  Line 224 
224            this.openElements[this.openElements.length - 1].appendChild (el);            this.openElements[this.openElements.length - 1].appendChild (el);
225    
226            // 11. Let the insertion point have the value of the old ...            // 11. Let the insertion point have the value of the old ...
227              oldInsertionPoint += this.insertionPoint;
228            this.setInsertionPoint (oldInsertionPoint);            this.setInsertionPoint (oldInsertionPoint);
229    
230            // 12. If there is a script that will execute as soon as ...            // 12. If there is a script that will execute as soon as ...

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24