Changeset 64b5f3112397fee684e191efb7a33d21f374b50f
- Timestamp:
- 03/14/2008 01:53:23 PM
(10 months ago)
- Author:
- Robin Luckey <robin@Tangier.local>
- git-committer:
- Robin Luckey <robin@Tangier.local> 1205528003 -0700
- git-parent:
[b5d153b1240eb6c91024d163c8a4cc368e7eaf6f]
- git-author:
- Henrik Grubbstrom <grubba@grubba.org> 1205359064 +0100
- Message:
Added disambiguator of *.in-files.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rb5d153b |
r64b5f31 |
|
| 138 | 138 | '.htm' => "html", |
|---|
| 139 | 139 | '.html' => "html", |
|---|
| | 140 | '.in' => :disambiguate_in, |
|---|
| 140 | 141 | '.inc' => :disambiguate_inc, |
|---|
| 141 | 142 | '.java' => "java", |
|---|
| … | … | |
| 265 | 266 | end |
|---|
| 266 | 267 | |
|---|
| | 268 | # For *.in files, checks the prior extension. |
|---|
| | 269 | # Typically used for template files (eg Makefile.in, auto.c.in, etc). |
|---|
| | 270 | def self.disambiguate_in(file_context) |
|---|
| | 271 | # if the filename has an extension prior to the .in |
|---|
| | 272 | if file_context.filename =~ /\..*\.in$/ |
|---|
| | 273 | filename = file_context.filename.gsub(/\.in$/, "") |
|---|
| | 274 | context = Ohcount::SimpleFileContext.new(filename, file_context.filenames, file_context.contents, file_context.file_location) |
|---|
| | 275 | return detect(context) |
|---|
| | 276 | end |
|---|
| | 277 | nil |
|---|
| | 278 | end |
|---|
| | 279 | |
|---|
| 267 | 280 | # For *.inc files, checks for a PHP class. |
|---|
| 268 | 281 | def self.disambiguate_inc(file_context) |
|---|