Skip to content

Commit

Permalink
Removed advanced example from README because of bug microsoft/vscode-…
Browse files Browse the repository at this point in the history
  • Loading branch information
angelo-mollame committed Jan 13, 2019
1 parent 046f659 commit 5094833
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 32 deletions.
31 changes: 1 addition & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,33 +204,4 @@ replace-regex "C:(\\%[name])*\\(%[name]%[extension])"
with "$2"
```

Variables can reference themselves and be overwritten. Here is an advanced example:

```c
// Input:
// export interface {
// function1(): void;
// function2(a: string | undefined): string[];
// function3(a: Map<string, number>, b: string[], c: string): Set<number> | undefined;
// function4(a: Class1.Type2): void;
// }
//
// Output:
// export interface {
// function1: () => void;
// function2: (a: string | undefined) => string[];
// function3: (a: Map<string, number>, b: string[], c: string) => Set<number> | undefined;
// function4: (a: Class1.Type2) => void;
// }

name = "\w+"
type = "[\w\.]+"
type = "%[type](?:<\w+(?:, \w+)*>)?"
type = "%[type](?:\[\])?"
type = "%[type](?: \| %[type])?"
parameter = "%[name]: %[type]"
parameters = "(?:%[parameter](?:, %[parameter])*)?"

replace-regex "(%[name])\((%[parameters])\): (%[type])"
with "$1: ($2) => $3"
```
Variables can reference themselves and be overwritten.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "batch-replacer",
"displayName": "Batch Replacer",
"description": "Allows to performs multiple text replacements at once, based on a script",
"version": "1.1.0",
"version": "1.1.1",
"publisher": "angelomollame",
"repository": {
"type": "git",
Expand Down

0 comments on commit 5094833

Please sign in to comment.