Sha256: 08c1a88207daf9b4786948a3b32b9a325ee2a8732a16fadffe736acb2f41a831

Contents?: true

Size: 1000 Bytes

Versions: 7

Compression:

Stored size: 1000 Bytes

Contents

Prism.languages.javascript = Prism.languages.extend('clike', {
	'keyword': /\b(break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|finally|for|function|get|if|implements|import|in|instanceof|interface|let|new|null|package|private|protected|public|return|set|static|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/g,
	'number': /\b-?(0x[\dA-Fa-f]+|\d*\.?\d+([Ee]-?\d+)?|NaN|-?Infinity)\b/g
});

Prism.languages.insertBefore('javascript', 'keyword', {
	'regex': {
		pattern: /(^|[^/])\/(?!\/)(\[.+?]|\\.|[^/\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/g,
		lookbehind: true
	}
});

if (Prism.languages.markup) {
	Prism.languages.insertBefore('markup', 'tag', {
		'script': {
			pattern: /<script[\w\W]*?>[\w\W]*?<\/script>/ig,
			inside: {
				'tag': {
					pattern: /<script[\w\W]*?>|<\/script>/ig,
					inside: Prism.languages.markup.tag.inside
				},
				rest: Prism.languages.javascript
			},
			alias: 'language-javascript'
		}
	});
}

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
hyhyhy-1.0.0 lib/hyhyhy/structure/_includes/prism/components/prism-javascript.js
hyhyhy-0.0.9 lib/hyhyhy/structure/_includes/prism/components/prism-javascript.js
hyhyhy-0.0.8 lib/hyhyhy/structure/_includes/prism/components/prism-javascript.js
hyhyhy-0.0.7 lib/hyhyhy/structure/_includes/prism/components/prism-javascript.js
hyhyhy-0.0.6 lib/hyhyhy/structure/_includes/prism/components/prism-javascript.js
hyhyhy-0.0.5 lib/hyhyhy/structure/_includes/prism/components/prism-javascript.js
hyhyhy-0.0.4 lib/hyhyhy/structure/_includes/prism/components/prism-javascript.js