Sha256: efae423f1db0d42998302205bb33e9a16b43594ac06dd0ad3aae466d75db497d

Contents?: true

Size: 1.27 KB

Versions: 10

Compression:

Stored size: 1.27 KB

Contents

Prism.languages.aspnet = Prism.languages.extend('markup', {
	'page-directive tag': {
		pattern: /<%\s*@.*%>/i,
		inside: {
			'page-directive tag': /<%\s*@\s*(?:Assembly|Control|Implements|Import|Master(?:Type)?|OutputCache|Page|PreviousPageType|Reference|Register)?|%>/i,
			rest: Prism.languages.markup.tag.inside
		}
	},
	'directive tag': {
		pattern: /<%.*%>/i,
		inside: {
			'directive tag': /<%\s*?[$=%#:]{0,2}|%>/i,
			rest: Prism.languages.csharp
		}
	}
});
// Regexp copied from prism-markup, with a negative look-ahead added
Prism.languages.aspnet.tag.pattern = /<(?!%)\/?[^\s>\/]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\\1|\\?(?!\1)[\w\W])*\1|[^\s'">=]+))?)*\s*\/?>/i;

// match directives of attribute value foo="<% Bar %>"
Prism.languages.insertBefore('inside', 'punctuation', {
	'directive tag': Prism.languages.aspnet['directive tag']
}, Prism.languages.aspnet.tag.inside["attr-value"]);

Prism.languages.insertBefore('aspnet', 'comment', {
	'asp comment': /<%--[\w\W]*?--%>/
});

// script runat="server" contains csharp, not javascript
Prism.languages.insertBefore('aspnet', Prism.languages.javascript ? 'script' : 'tag', {
	'asp script': {
		pattern: /(<script(?=.*runat=['"]?server['"]?)[\w\W]*?>)[\w\W]*?(?=<\/script>)/i,
		lookbehind: true,
		inside: Prism.languages.csharp || {}
	}
});

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
prism-rails-1.6.0.3 vendor/assets/javascripts/prism/prism-aspnet.js
prism-rails-1.6.0.2 vendor/assets/javascripts/prism/prism-aspnet.js
prism-rails-1.6.0.1 vendor/assets/javascripts/prism/prism-aspnet.js
prism-rails-1.5.1.2 vendor/assets/javascripts/prism-aspnet.js
prism-rails-1.5.1 vendor/assets/javascripts/prism-aspnet.js
highlighting-0.1.4 vendor/assets/javascripts/prism-aspnet.js
highlighting-0.1.3 vendor/assets/javascripts/prism-aspnet.js
highlighting-0.1.2 vendor/assets/javascripts/prism-aspnet.js
highlighting-0.1.1 vendor/assets/javascripts/prism-aspnet.js
highlighting-0.1.0 vendor/assets/javascripts/prism-aspnet.js