Skip to content

Commit

Permalink
C#: Fix preprocessor pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
Golmote committed Jul 16, 2015
1 parent 42fbeef commit 86311f5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion components/prism-csharp.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ Prism.languages.csharp = Prism.languages.extend('clike', {
/@("|')(\1\1|\\\1|\\?(?!\1)[\s\S])*\1/,
/("|')(\\?.)*?\1/
],
'preprocessor': /^\s*#.*/m,
'number': /\b-?(0x[\da-f]+|\d*\.?\d+)\b/i
});

Prism.languages.insertBefore('csharp', 'keyword', {
'preprocessor': {
pattern: /(^\s*)#.*/m,
lookbehind: true
}
});
2 changes: 1 addition & 1 deletion components/prism-csharp.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 86311f5

Please sign in to comment.