|
|
|
@ -93,6 +93,7 @@ export const language = <ILanguage>{
|
|
|
|
|
scriptAfterType: [
|
|
|
|
|
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.scriptAfterType' }],
|
|
|
|
|
[/=/, 'delimiter', '@scriptAfterTypeEquals'],
|
|
|
|
|
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded.text/javascript', nextEmbedded: 'text/javascript' }], // cover invalid e.g. <script type>
|
|
|
|
|
[/[ \t\r\n]+/], // whitespace
|
|
|
|
|
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
|
|
|
|
],
|
|
|
|
@ -102,6 +103,7 @@ export const language = <ILanguage>{
|
|
|
|
|
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.scriptAfterTypeEquals' }],
|
|
|
|
|
[/"([^"]*)"/, { token: 'attribute.value', switchTo: '@scriptWithCustomType.$1' }],
|
|
|
|
|
[/'([^']*)'/, { token: 'attribute.value', switchTo: '@scriptWithCustomType.$1' }],
|
|
|
|
|
[/>/, { token: 'delimiter.html', next: '@scriptEmbedded.text/javascript', nextEmbedded: 'text/javascript' }], // cover invalid e.g. <script type=>
|
|
|
|
|
[/[ \t\r\n]+/], // whitespace
|
|
|
|
|
[/<\/script\s*>/, { token: '@rematch', next: '@pop' }]
|
|
|
|
|
],
|
|
|
|
@ -145,6 +147,7 @@ export const language = <ILanguage>{
|
|
|
|
|
styleAfterType: [
|
|
|
|
|
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.styleAfterType' }],
|
|
|
|
|
[/=/, 'delimiter', '@styleAfterTypeEquals'],
|
|
|
|
|
[/>/, { token: 'delimiter.html', next: '@styleEmbedded.text/css', nextEmbedded: 'text/css' }], // cover invalid e.g. <style type>
|
|
|
|
|
[/[ \t\r\n]+/], // whitespace
|
|
|
|
|
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
|
|
|
|
],
|
|
|
|
@ -154,6 +157,7 @@ export const language = <ILanguage>{
|
|
|
|
|
[/<\?((php)|=)?/, { token: '@rematch', switchTo: '@phpInSimpleState.styleAfterTypeEquals' }],
|
|
|
|
|
[/"([^"]*)"/, { token: 'attribute.value', switchTo: '@styleWithCustomType.$1' }],
|
|
|
|
|
[/'([^']*)'/, { token: 'attribute.value', switchTo: '@styleWithCustomType.$1' }],
|
|
|
|
|
[/>/, { token: 'delimiter.html', next: '@styleEmbedded.text/css', nextEmbedded: 'text/css' }], // cover invalid e.g. <style type=>
|
|
|
|
|
[/[ \t\r\n]+/], // whitespace
|
|
|
|
|
[/<\/style\s*>/, { token: '@rematch', next: '@pop' }]
|
|
|
|
|
],
|
|
|
|
|