Skip to content

Commit

Permalink
Treat "generic config file" as its own language.
Browse files Browse the repository at this point in the history
This captures the '*.conf' extension, using the '#' line comment format
which is extremely common (though not universal).
  • Loading branch information
sjjf committed Nov 16, 2024
1 parent 837fe44 commit 74e8301
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,11 @@
],
"extensions": ["gd"]
},
"GenericConfig": {
"name": "Generic config file",
"line_comment": ["#"],
"extensions": ["conf"]
},
"Gherkin": {
"name": "Gherkin (Cucumber)",
"line_comment": ["#"],
Expand Down
16 changes: 16 additions & 0 deletions tests/data/generic_config.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# 16 lines 10 code 4 comments 2 blanks
# This is a comment
this=not_a_comment
[this_is_a_section]
and this is not a comment either

# Why is it so hard to create a random file like this?
foo=bar
bar=baz

## Tricksy comments!
more
lines
that
are
not comments

0 comments on commit 74e8301

Please sign in to comment.