Skip to content

Instantly share code, notes, and snippets.

@lluchs
Created December 21, 2012 23:34
Show Gist options
  • Save lluchs/4356587 to your computer and use it in GitHub Desktop.
Save lluchs/4356587 to your computer and use it in GitHub Desktop.
Prism highlighting definition for Clonk maps (http://www.clonk.de/docs/en/sdk/scenario/MapCreatorS2.html)
Prism.languages.map = {
'comment': {
pattern: /(^|[^\\])(\/\*[\w\W]*?\*\/|\/\/.*?(\r?\n|$))/g,
lookbehind: true
},
'keyword': /\b(map|overlay|point)\b/g,
'property': /\b(mat|tex|x|y|wdt|hgt|algo|zoomX|zoomY|ox|oy|a|b|turbulence|rotate|invert|seed|loosebounds|mask|grp|sub|lambda)\b/g,
'attr-name': /\b(solid|random|checker|bozo|sin|boxes|rndchecker|lines|border|mandel|rndall|script|poly)\b/g,
'number': /\b-?\d+(%|px\b|\b)/g,
'operator': /&|\||\^|=/g,
'ignore': /&(lt|gt|amp);/gi,
'punctuation': /[{}[\];(),.:]/g
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment