diff --git a/components/prism-aspnet.js b/components/prism-aspnet.js index 291823e2a5..9511e453d6 100644 --- a/components/prism-aspnet.js +++ b/components/prism-aspnet.js @@ -29,23 +29,8 @@ Prism.languages.insertBefore('aspnet', 'comment', { // script runat="server" contains csharp, not javascript Prism.languages.insertBefore('aspnet', Prism.languages.javascript ? 'script' : 'tag', { 'asp script': { - pattern: /[\w\W]*?<\/script>/i, - inside: { - tag: { - pattern: /<\/?script\s*(?:\s+[\w:-]+(?:=(?:("|')(\\?[\w\W])*?\1|\w+))?\s*)*\/?>/i, - inside: Prism.languages.aspnet.tag.inside - }, - rest: Prism.languages.csharp || {} - } + pattern: /()[\w\W]*?(?=<\/script>)/i, + lookbehind: true, + inside: Prism.languages.csharp || {} } -}); - -// Hacks to fix eager tag matching finishing too early: