|
65 | 65 | <script>self = (typeof window !== 'undefined') |
66 | 66 | ? window // if in browser |
67 | 67 | : ( |
68 | | - (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) |
| 68 | + (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) |
69 | 69 | ? self // if in worker |
70 | 70 | : {} // if in node js |
71 | 71 | ); |
|
89 | 89 | } else if (_.util.type(tokens) === 'Array') { |
90 | 90 | return tokens.map(_.util.encode); |
91 | 91 | } else { |
92 | | - return tokens.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/\u00a0/g, ' '); |
| 92 | + return tokens.replace(/&/g, '&').replace(/</g, '<').replace(/\u00a0/g, ' '); |
93 | 93 | } |
94 | 94 | }, |
95 | 95 |
|
|
187 | 187 |
|
188 | 188 | var elements = document.querySelectorAll('pre[class*="language-"], [class*="language-"] pre, pre[class*="lang-"], [class*="lang-"] pre'); |
189 | 189 | for (var i=0, element; element = elements[i++];) { |
190 | | - if (element.firstElementChild && element.firstElementChild.tagName.toLowerCase() == "code") { |
| 190 | + if (element.firstElementChild && element.firstElementChild.tagName.toLowerCase() == "code") { |
191 | 191 | // Already handled by the previous loop |
192 | 192 | continue; |
193 | 193 | } |
|
203 | 203 | // Find language |
204 | 204 | var language, grammar, parent = element; |
205 | 205 |
|
206 | | - while (parent && !lang.test(parent.className)) { |
| 206 | + while (parent && !lang.test(parent.className)) { |
207 | 207 | parent = parent.parentNode; |
208 | 208 | } |
209 | 209 |
|
|
241 | 241 |
|
242 | 242 | _.hooks.run('before-highlight', env); |
243 | 243 |
|
244 | | - if (async && self.Worker) { |
| 244 | + if (async && self.Worker) { |
245 | 245 | var worker = new Worker(_.filename); |
246 | 246 |
|
247 | 247 | worker.onmessage = function(evt) { |
|
251 | 251 |
|
252 | 252 | env.element.innerHTML = env.highlightedCode; |
253 | 253 |
|
254 | | - callback && callback.call(env.element); |
| 254 | + callback && callback.call(env.element); |
255 | 255 | _.hooks.run('after-highlight', env); |
256 | 256 | }; |
257 | 257 |
|
|
267 | 267 |
|
268 | 268 | env.element.innerHTML = env.highlightedCode; |
269 | 269 |
|
270 | | - callback && callback.call(element); |
| 270 | + callback && callback.call(element); |
271 | 271 |
|
272 | 272 | _.hooks.run('after-highlight', env); |
273 | 273 | } |
|
301 | 301 | var patterns = grammar[token]; |
302 | 302 | patterns = (_.util.type(patterns) === "Array") ? patterns : [patterns]; |
303 | 303 |
|
304 | | - for (var j = 0; j < patterns.length; ++j) { |
| 304 | + for (var j = 0; j < patterns.length; ++j) { |
305 | 305 | var pattern = patterns[j], |
306 | 306 | inside = pattern.inside, |
307 | 307 | lookbehind = !!pattern.lookbehind, |
|
310 | 310 |
|
311 | 311 | pattern = pattern.pattern || pattern; |
312 | 312 |
|
313 | | - for (var i=0; i<strarr.length; i++) { // Don’t cache length as it changes during the loop |
| 313 | + for (var i=0; i<strarr.length; i++) { // Don’t cache length as it changes during the loop |
314 | 314 |
|
315 | 315 | var str = strarr[i]; |
316 | 316 |
|
|
431 | 431 | attributes += name + '="' + (env.attributes[name] || '') + '"'; |
432 | 432 | } |
433 | 433 |
|
434 | | - return '<' + env.tag + ' class="' + env.classes.join(' ') + '" ' + attributes + '>' + env.content + '</' + env.tag + '>'; |
| 434 | + return '<' + env.tag + ' class="' + env.classes.join(' ') + '" ' + attributes + '>' + env.content + '</' + env.tag + '>'; |
435 | 435 |
|
436 | 436 | }; |
437 | 437 |
|
|
461 | 461 | if (script) { |
462 | 462 | _.filename = script.src; |
463 | 463 |
|
464 | | - if (document.addEventListener && !script.hasAttribute('data-manual')) { |
| 464 | + if (document.addEventListener && !script.hasAttribute('data-manual')) { |
465 | 465 | document.addEventListener('DOMContentLoaded', _.highlightAll); |
466 | 466 | } |
467 | 467 | } |
|
470 | 470 |
|
471 | 471 | })(); |
472 | 472 |
|
473 | | -if (typeof module !== 'undefined' && module.exports) { |
| 473 | +if (typeof module !== 'undefined' && module.exports) { |
474 | 474 | module.exports = Prism; |
475 | 475 | } |
476 | 476 | ; |
477 | 477 | Prism.languages.markup = { |
478 | | - 'comment': /<!--[\w\W]*?-->/g, |
479 | | - 'prolog': /<\?.+?\?>/, |
480 | | - 'doctype': /<!DOCTYPE.+?>/, |
481 | | - 'cdata': /<!\[CDATA\[[\w\W]*?]]>/i, |
| 478 | + 'comment': /<!--[\w\W]*?-->/g, |
| 479 | + 'prolog': /<\?.+?\?>/, |
| 480 | + 'doctype': /<!DOCTYPE.+?>/, |
| 481 | + 'cdata': /<!\[CDATA\[[\w\W]*?]]>/i, |
482 | 482 | 'tag': { |
483 | | - pattern: /<\/?[\w:-]+\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|[^\s'">=]+))?\s*)*\/?>/gi, |
| 483 | + pattern: /<\/?[\w:-]+\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|[^\s'">=]+))?\s*)*\/?>/gi, |
484 | 484 | inside: { |
485 | 485 | 'tag': { |
486 | | - pattern: /^<\/?[\w:-]+/i, |
| 486 | + pattern: /^<\/?[\w:-]+/i, |
487 | 487 | inside: { |
488 | | - 'punctuation': /^<\/?/, |
| 488 | + 'punctuation': /^<\/?/, |
489 | 489 | 'namespace': /^[\w-]+?:/ |
490 | 490 | } |
491 | 491 | }, |
|
505 | 505 |
|
506 | 506 | } |
507 | 507 | }, |
508 | | - 'entity': /\&#?[\da-z]{1,8};/gi |
| 508 | + 'entity': /\&#?[\da-z]{1,8};/gi |
509 | 509 | }; |
510 | 510 |
|
511 | 511 | // Plugin to make entity title show the real entity, idea by Roman Komarov |
512 | 512 | Prism.hooks.add('wrap', function(env) { |
513 | 513 |
|
514 | 514 | if (env.type === 'entity') { |
515 | | - env.attributes['title'] = env.content.replace(/&amp;/, '&'); |
| 515 | + env.attributes['title'] = env.content.replace(/&/, '&'); |
516 | 516 | } |
517 | 517 | }); |
518 | 518 | ; |
|
536 | 536 | if (Prism.languages.markup) { |
537 | 537 | Prism.languages.insertBefore('markup', 'tag', { |
538 | 538 | 'style': { |
539 | | - pattern: /<style[\w\W]*?>[\w\W]*?<\/style>/ig, |
| 539 | + pattern: /<style[\w\W]*?>[\w\W]*?<\/style>/ig, |
540 | 540 | inside: { |
541 | 541 | 'tag': { |
542 | | - pattern: /<style[\w\W]*?>|<\/style>/ig, |
| 542 | + pattern: /<style[\w\W]*?>|<\/style>/ig, |
543 | 543 | inside: Prism.languages.markup.tag.inside |
544 | 544 | }, |
545 | 545 | rest: Prism.languages.css |
|
563 | 563 | 'number': /[\d%\.]+/g |
564 | 564 | });; |
565 | 565 | </script> |
566 | | - <style>/* http://prismjs.com/download.html?themes=prism&languages=clike */ |
| 566 | + <style>/* http://prismjs.com/download.html?themes=prism&languages=clike */ |
567 | 567 | /** |
568 | 568 | * prism.js default theme for JavaScript, CSS and HTML |
569 | 569 | * Based on dabblet (http://dabblet.com) |
|
711 | 711 | <h1 class="p-name no-ref" id="title">CSS Basic User Interface Module Level 3 (CSS3 UI)</h1> |
712 | 712 |
|
713 | 713 | <h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, |
714 | | - <time class="dt-updated" datetime="2015-01-07">7 January 2015</time></span></h2> |
| 714 | + <time class="dt-updated" datetime="2015-01-12">12 January 2015</time></span></h2> |
715 | 715 |
|
716 | 716 | <div data-fill-with="spec-metadata"> |
717 | 717 | <dl> |
@@ -1296,7 +1296,7 @@ <h3 class="heading settled" data-level="5.2" id="outline-width"><span class="sec |
1296 | 1296 |
|
1297 | 1297 | <tr> |
1298 | 1298 | <th>Value:</th> |
1299 | | - <td><a class="production" data-link-type="propdesc" href="http://dev.w3.org/csswg/css2/box.html#propdef-border-width" title="border-width"><‘border-width’></a></td></tr> |
| 1299 | + <td><a class="production" data-link-type="propdesc" href="http://dev.w3.org/csswg/css-backgrounds-3/#border-width" title="border-width"><‘border-width’></a></td></tr> |
1300 | 1300 |
|
1301 | 1301 |
|
1302 | 1302 | <tr> |
@@ -1350,7 +1350,7 @@ <h3 class="heading settled" data-level="5.3" id="outline-style"><span class="sec |
1350 | 1350 |
|
1351 | 1351 | <tr> |
1352 | 1352 | <th>Value:</th> |
1353 | | - <td>auto | <a class="production" data-link-type="propdesc" href="http://dev.w3.org/csswg/css2/box.html#propdef-border-style" title="border-style"><‘border-style’></a></td></tr> |
| 1353 | + <td>auto | <a class="production" data-link-type="propdesc" href="http://dev.w3.org/csswg/css-backgrounds-3/#border-style" title="border-style"><‘border-style’></a></td></tr> |
1354 | 1354 |
|
1355 | 1355 |
|
1356 | 1356 | <tr> |
@@ -1482,14 +1482,14 @@ <h3 class="heading settled" data-level="5.4" id="outline-color"><span class="sec |
1482 | 1482 |
|
1483 | 1483 | <p>The <a class="property" data-link-type="propdesc" href="#propdef-outline-width">outline-width</a> property accepts |
1484 | 1484 | the same values as |
1485 | | - <a class="property" data-link-type="propdesc" href="http://dev.w3.org/csswg/css2/box.html#propdef-border-width">border-width</a> |
| 1485 | + <a class="property" data-link-type="propdesc" href="http://dev.w3.org/csswg/css-backgrounds-3/#border-width">border-width</a> |
1486 | 1486 | (<a data-biblio-type="normative" data-link-type="biblio" href="#biblio-css3bg" title="CSS3BG">[CSS3BG]</a>, |
1487 | 1487 | <a href="http://www.w3.org/TR/css3-background/#the-border-width">Section 4.3</a>).</p> |
1488 | 1488 |
|
1489 | 1489 |
|
1490 | 1490 | <p>The <a class="property" data-link-type="propdesc" href="#propdef-outline-style">outline-style</a> property accepts |
1491 | 1491 | the same values as |
1492 | | - <a class="property" data-link-type="propdesc" href="http://dev.w3.org/csswg/css2/box.html#propdef-border-style">border-style</a> |
| 1492 | + <a class="property" data-link-type="propdesc" href="http://dev.w3.org/csswg/css-backgrounds-3/#border-style">border-style</a> |
1493 | 1493 | (<a data-biblio-type="normative" data-link-type="biblio" href="#biblio-css3bg" title="CSS3BG">[CSS3BG]</a>, |
1494 | 1494 | <a href="http://www.w3.org/TR/css3-background/#the-border-style">Section 4.2</a>), |
1495 | 1495 | except that |
|
0 commit comments