Commit 889cfeb114cc724e2342851e01f3abbf28b1887c

Simon Reynolds 2015-02-06T22:05:44

Added hexadecimal support

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/components/prism-fsharp.js b/components/prism-fsharp.js
index 51f9402..682c667 100644
--- a/components/prism-fsharp.js
+++ b/components/prism-fsharp.js
@@ -12,5 +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)?.)*?\1(B)?/g,
 	'preprocessor': /^\s*#.*/gm,
-	'number': /\b-?(0x)?\d*\.?\d+(y|uy|s|us|l|ul|un|L|UL|F|f|lf|LF|I|M|m)?\b/g
+	'number': /\b-?(0x)?(\d[a-fA-F]?)*\.?((\d\.?[a-fA-F]?)(y|uy|s|us|l|ul|un|L|UL|F|f|lf|LF|I|M|m))?\b/g
 });
\ No newline at end of file
diff --git a/components/prism-fsharp.min.js b/components/prism-fsharp.min.js
index d55c5ed..811719a 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:/(^|[^\\:])\/\/.*?(\r?\n|$)/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)?.)*?\1(B)?/g,preprocessor:/^\s*#.*/gm,number:/\b-?(0x)?\d*\.?\d+(y|uy|s|us|l|ul|un|L|UL|F|f|lf|LF|I|M|m)?\b/g});
\ No newline at end of file
+Prism.languages.fsharp=Prism.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*[\w\W]*?\*\)/g,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*?(\r?\n|$)/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)?.)*?\1(B)?/g,preprocessor:/^\s*#.*/gm,number:/\b-?(0x)?(\d[a-fA-F]?)*\.?((\d\.?[a-fA-F]?)(y|uy|s|us|l|ul|un|L|UL|F|f|lf|LF|I|M|m))?\b/g});
\ No newline at end of file