Commit 9b88775c21fec1c097fbfa108794166dc55b4945

Simon Reynolds 2015-02-13T08:31:45

Change numbers regexes from objects to simple array

diff --git a/components/prism-fsharp.js b/components/prism-fsharp.js
index eaa3db4..c4768cf 100644
--- a/components/prism-fsharp.js
+++ b/components/prism-fsharp.js
@@ -12,18 +12,5 @@ Prism.languages.fsharp = Prism.languages.extend('clike', {
 	'keyword': /\b(abstract|and|as|assert|base|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|global|if|in|inherit|inline|interface|internal|lazy|let|let!|match|member|module|mutable|namespace|new|not|null|of|open|or|override|private|public|rec|return|return!|select|static|struct|then|to|true|try|type|upcast|use|use!|val|void|when|while|with|yield|yield!|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall|trait|virtual|volatile)\b/g,
 	'string': /@?("""|"|')((\\|\n)?.)*?\1B?/g,
 	'preprocessor': /^\s*#.*/gm,
-	'number': [
-		{
-			pattern: /\b-?0x[\da-fA-F]+(un|lf|LF)?\b/g
-		},
-		{
-			pattern: /\b-?0b[01]+(y|uy)?\b/g
-		},
-		{
-			pattern: /\b-?(\d+\.|\d*\.?\d+)([fFmM]|[eE][+-]?\d+)?\b/g
-		},
-		{
-			pattern: /\b-?\d+(y|uy|s|us|l|u|ul|L|UL|I)?\b/g
-		}
-	]
+	'number': [ /\b-?0x[\da-fA-F]+(un|lf|LF)?\b/g, /\b-?0b[01]+(y|uy)?\b/g, /\b-?(\d+\.|\d*\.?\d+)([fFmM]|[eE][+-]?\d+)?\b/g, /\b-?\d+(y|uy|s|us|l|u|ul|L|UL|I)?\b/g ]
 });
\ No newline at end of file
diff --git a/components/prism-fsharp.min.js b/components/prism-fsharp.min.js
index 937a84f..548c828 100644
--- a/components/prism-fsharp.min.js
+++ b/components/prism-fsharp.min.js
@@ -1 +1 @@
-Prism.languages.fsharp=Prism.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*[\w\W]*?\*\)/g,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/g,lookbehind:!0}],keyword:/\b(abstract|and|as|assert|base|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|global|if|in|inherit|inline|interface|internal|lazy|let|let!|match|member|module|mutable|namespace|new|not|null|of|open|or|override|private|public|rec|return|return!|select|static|struct|then|to|true|try|type|upcast|use|use!|val|void|when|while|with|yield|yield!|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall|trait|virtual|volatile)\b/g,string:/@?("""|"|')((\\|\n)?.)*?\1B?/g,preprocessor:/^\s*#.*/gm,number:[{pattern:/\b-?0x[\da-fA-F]+(un|lf|LF)?\b/g},{pattern:/\b-?0b[01]+(y|uy)?\b/g},{pattern:/\b-?(\d+\.|\d*\.?\d+)([fFmM]|[eE][+-]?\d+)?\b/g},{pattern:/\b-?\d+(y|uy|s|us|l|u|ul|L|UL|I)?\b/g}]});
\ No newline at end of file
+Prism.languages.fsharp=Prism.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*[\w\W]*?\*\)/g,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/g,lookbehind:!0}],keyword:/\b(abstract|and|as|assert|base|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|global|if|in|inherit|inline|interface|internal|lazy|let|let!|match|member|module|mutable|namespace|new|not|null|of|open|or|override|private|public|rec|return|return!|select|static|struct|then|to|true|try|type|upcast|use|use!|val|void|when|while|with|yield|yield!|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall|trait|virtual|volatile)\b/g,string:/@?("""|"|')((\\|\n)?.)*?\1B?/g,preprocessor:/^\s*#.*/gm,number:[/\b-?0x[\da-fA-F]+(un|lf|LF)?\b/g,/\b-?0b[01]+(y|uy)?\b/g,/\b-?(\d+\.|\d*\.?\d+)([fFmM]|[eE][+-]?\d+)?\b/g,/\b-?\d+(y|uy|s|us|l|u|ul|L|UL|I)?\b/g]});
\ No newline at end of file