summaryrefslogtreecommitdiff
path: root/pygments/lexers/c_cpp.py
diff options
context:
space:
mode:
authorTim Hatch <tim@timhatch.com>2015-10-16 18:51:01 -0700
committerTim Hatch <tim@timhatch.com>2015-10-16 18:51:01 -0700
commit1cf28f96951c1ac58353800840af45940b3952a9 (patch)
tree4910f5df3673325904a518817d74d49efb8681ea /pygments/lexers/c_cpp.py
parent2a74e18cb1b8b7cc2848e236a636e49be46ed165 (diff)
downloadpygments-1cf28f96951c1ac58353800840af45940b3952a9.tar.gz
Fixes #1148: Trigger using CLexer off string "#ifndef"
Diffstat (limited to 'pygments/lexers/c_cpp.py')
-rw-r--r--pygments/lexers/c_cpp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pygments/lexers/c_cpp.py b/pygments/lexers/c_cpp.py
index 35ea517f..624ebb71 100644
--- a/pygments/lexers/c_cpp.py
+++ b/pygments/lexers/c_cpp.py
@@ -181,7 +181,7 @@ class CLexer(CFamilyLexer):
def analyse_text(text):
if re.search('^\s*#include [<"]', text, re.MULTILINE):
return 0.1
- if re.search('^\s*#ifdef ', text, re.MULTILINE):
+ if re.search('^\s*#ifn?def ', text, re.MULTILINE):
return 0.1