Skip to content

Commit

Permalink
Add .pm as perl. Fixes microsoft#90550.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackson Kearl committed Feb 12, 2020
1 parent c826b53 commit d22fd6d
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 0 deletions.
1 change: 1 addition & 0 deletions extensions/search-result/syntaxes/generateTMLanguage.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const mappings = [
['perl', 'source.perl'],
['php', 'source.php'],
['pl', 'source.perl'],
['pm', 'source.perl'],
['ps1', 'source.powershell'],
['pug', 'text.pug'],
['py', 'source.python'],
Expand Down
89 changes: 89 additions & 0 deletions extensions/search-result/syntaxes/searchResult.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@
{
"include": "#pl"
},
{
"include": "#pm"
},
{
"include": "#ps1"
},
Expand Down Expand Up @@ -3457,6 +3460,92 @@
}
]
},
"pm": {
"name": "meta.resultBlock.search",
"begin": "^(?!\\s)(.*?)([^\\\\\\/\\n]*\\.pm)(:)$",
"end": "^(?!\\s)",
"beginCaptures": {
"0": {
"name": "string meta.path.search"
},
"1": {
"name": "meta.path.dirname.search"
},
"2": {
"name": "meta.path.basename.search"
},
"3": {
"name": "punctuation.separator"
}
},
"patterns": [
{
"name": "meta.resultLine.search meta.resultLine.multiLine.search",
"begin": "^ ((\\d+) )",
"while": "^ (?:((\\d+)(:))|((\\d+) ))",
"beginCaptures": {
"0": {
"name": "constant.numeric.integer meta.resultLinePrefix.search"
},
"1": {
"name": "meta.resultLinePrefix.contextLinePrefix.search"
},
"2": {
"name": "meta.resultLinePrefix.lineNumber.search"
}
},
"whileCaptures": {
"0": {
"name": "constant.numeric.integer meta.resultLinePrefix.search"
},
"1": {
"name": "meta.resultLinePrefix.matchLinePrefix.search"
},
"2": {
"name": "meta.resultLinePrefix.lineNumber.search"
},
"3": {
"name": "punctuation.separator"
},
"4": {
"name": "meta.resultLinePrefix.contextLinePrefix.search"
},
"5": {
"name": "meta.resultLinePrefix.lineNumber.search"
}
},
"patterns": [
{
"include": "source.perl"
}
]
},
{
"begin": "^ ((\\d+)(:))",
"while": "(?=not)possible",
"name": "meta.resultLine.search meta.resultLine.singleLine.search",
"beginCaptures": {
"0": {
"name": "constant.numeric.integer meta.resultLinePrefix.search"
},
"1": {
"name": "meta.resultLinePrefix.matchLinePrefix.search"
},
"2": {
"name": "meta.resultLinePrefix.lineNumber.search"
},
"3": {
"name": "punctuation.separator"
}
},
"patterns": [
{
"include": "source.perl"
}
]
}
]
},
"ps1": {
"name": "meta.resultBlock.search",
"begin": "^(?!\\s)(.*?)([^\\\\\\/\\n]*\\.ps1)(:)$",
Expand Down

0 comments on commit d22fd6d

Please sign in to comment.