Skip to content

Commit b9f96a5

Browse files
committed
Updated readme, better matching of section headers
1 parent 38682c0 commit b9f96a5

File tree

4 files changed

+19
-11
lines changed

4 files changed

+19
-11
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# Change Log
22

3+
## [1.0.1] - 2018-03-21
4+
- Fixed the comment character, removed block comments
5+
- Improved the matching of sections
6+
37
## [1.0.0] - 2017-02-14
48
- Initial Release

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ Syntax highlighting for `.gitconfig`, `.gitattributes`, and `.gitmodules` files.
1111

1212
See `CHANGELOG.md` for more in-depth notes.
1313

14+
### `1.0.1`
15+
16+
Cleanup related to comments, improved matching of section headers.
17+
1418
### `1.0.0`
1519

1620
Initial release

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "gitconfig",
33
"displayName": "Gitconfig Syntax",
44
"description": "Adds syntax highlighting support for Git config files",
5-
"version": "1.0.0",
5+
"version": "1.0.1",
66
"publisher": "sidneys1",
77
"repository": {
88
"type": "git",

syntaxes/Gitconfig.tmLanguage

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@
1010
<string>Gitconfig</string>
1111
<key>patterns</key>
1212
<array>
13+
<dict>
14+
<key>comment</key>
15+
<string>Comments</string>
16+
<key>match</key>
17+
<string>#.*</string>
18+
<key>name</key>
19+
<string>comment.gitconfig</string>
20+
</dict>
1321
<dict>
1422
<key>captures</key>
1523
<dict>
@@ -22,7 +30,7 @@
2230
<key>comment</key>
2331
<string>Section headings</string>
2432
<key>match</key>
25-
<string>^\[[^]"]*("\w+")?\]</string>
33+
<string>^\[[\w\.-]+(\s\"[\w\\(\\\")(\\\\)]+\")?\]</string>
2634
<key>name</key>
2735
<string>entity.gitconfig</string>
2836
</dict>
@@ -43,18 +51,10 @@
4351
<key>comment</key>
4452
<string>Setting</string>
4553
<key>match</key>
46-
<string>([^=]+)\s*=\s*([^#]*)</string>
54+
<string>^\s+(\w[\w-]+)\s*=\s*([^#]*)</string>
4755
<key>name</key>
4856
<string>support.gitconfig</string>
4957
</dict>
50-
<dict>
51-
<key>comment</key>
52-
<string>Comments</string>
53-
<key>match</key>
54-
<string>#.*</string>
55-
<key>name</key>
56-
<string>comment.gitconfig</string>
57-
</dict>
5858
</array>
5959
<key>scopeName</key>
6060
<string>text.gitconfig</string>

0 commit comments

Comments
 (0)