History

Update Prism.js

Fixes #34

Thibaut committed 12 years ago

Commit f8f7c751 parent a5fa8d91 file · +4 −4Browse files

Unified · Split

assets/javascripts/vendor/prism.js+4−4
@@ -356,7 +356,7 @@ Prism.languages.markup = { · 355 unmodified lines
356356 'doctype': /<!DOCTYPE.+?>/,
357357 'cdata': /<!\[CDATA\[[\w\W]*?]]>/i,
358358 'tag': {
359− pattern: /<\/?[\w:-]+\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|\w+))?\s*)*\/?>/gi,
359+ pattern: /<\/?[\w:-]+\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|[^\s'">=]+))?\s*)*\/?>/gi,
360360 inside: {
361361 'tag': {
362362 pattern: /^<\/?[\w:-]+/i,
@@ -390,7 +390,8 @@ Prism.hooks.add('wrap', function(env) { · 27 unmodified lines
390390 if (env.type === 'entity') {
391391 env.attributes['title'] = env.content.replace(/&/, '&');
392392 }
393−});;
393+});
394+;
394395 Prism.languages.css = {
395396 'comment': /\/\*[\w\W]*?\*\//g,
396397 'atrule': {
@@ -526,8 +527,7 @@ Prism.languages.insertBefore('ruby', 'keyword', { · 129 unmodified lines
526527 pattern: /(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/g,
527528 lookbehind: true
528529 },
529− 'variable': /[@$&]+\b[a-zA-Z_][a-zA-Z_0-9]*[?!]?\b/g,
530+ 'variable': /[@$]+\b[a-zA-Z_][a-zA-Z_0-9]*[?!]?\b/g,
530531 'symbol': /:\b[a-zA-Z_][a-zA-Z_0-9]*[?!]?\b/g
531532 });
532−
533533 ;