From f8f7c75a6fac07a4932576042860d9cc8a2f71af Mon Sep 17 00:00:00 2001 From: Thibaut Date: Sun, 12 Jan 2014 09:35:52 -0500 Subject: [PATCH] Update Prism.js Fixes #34 --- assets/javascripts/vendor/prism.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/javascripts/vendor/prism.js b/assets/javascripts/vendor/prism.js index 4074a487..0b960dcb 100644 --- a/assets/javascripts/vendor/prism.js +++ b/assets/javascripts/vendor/prism.js @@ -356,7 +356,7 @@ Prism.languages.markup = { 'doctype': /<!DOCTYPE.+?>/, 'cdata': /<!\[CDATA\[[\w\W]*?]]>/i, 'tag': { - pattern: /<\/?[\w:-]+\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|\w+))?\s*)*\/?>/gi, + pattern: /<\/?[\w:-]+\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|[^\s'">=]+))?\s*)*\/?>/gi, inside: { 'tag': { pattern: /^<\/?[\w:-]+/i, @@ -390,7 +390,8 @@ Prism.hooks.add('wrap', function(env) { if (env.type === 'entity') { env.attributes['title'] = env.content.replace(/&/, '&'); } -});; +}); +; Prism.languages.css = { 'comment': /\/\*[\w\W]*?\*\//g, 'atrule': { @@ -526,8 +527,7 @@ Prism.languages.insertBefore('ruby', 'keyword', { pattern: /(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/g, lookbehind: true }, - 'variable': /[@$&]+\b[a-zA-Z_][a-zA-Z_0-9]*[?!]?\b/g, + 'variable': /[@$]+\b[a-zA-Z_][a-zA-Z_0-9]*[?!]?\b/g, 'symbol': /:\b[a-zA-Z_][a-zA-Z_0-9]*[?!]?\b/g }); - ;