Skip to content

Commit b7baa46

Browse files
committed
updated to 0.0.0002 see README
1 parent 3c14f78 commit b7baa46

File tree

4 files changed

+28
-13
lines changed

4 files changed

+28
-13
lines changed

README.md

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,15 @@ This is a list of the current regular expressions that are currently implemented
1212

1313
functionName - function description - "regular expression", "flags" - "replacement text"
1414

15-
- rmHangingSpaces - This function removes all of the spaces that appear at the end of sentences - " $", "gm" - ""
16-
- rmNewLines - This function removes all of the new lines in the selection - "\n", "gm" - " "
17-
- rmHyphenLineEnd - This function removes all of the hyphens that appear at the end of the line - "(?<=[a-z])-$\n(?=[a-z])", "gm" - ""
18-
- rmSentenceBreaks - This function removes all of the newlines that appear to break up a sentence - "[a-z]$\n+[a-z]", "gm" - " "
15+
- rmHangingSpaces
16+
- This function removes all of the spaces that appear at the end of sentences - " $", "gm" - ""
17+
- rmNewLines
18+
- This function removes all of the new lines in the selection - "\n", "gm" - " "
19+
- rmHyphenLineEnd
20+
- This function removes all of the hyphens that appear at the end of the line - "(?<=[a-z])-$\n(?=[a-z])", "gm" - ""
21+
- rmSentenceBreaks
22+
- This function removes all of the newlines that appear to break up a sentence - "[a-z]$\n+[a-z]", "gm" - " "
23+
1924
<!--
2025
\!\[feature X\]\(images/feature-x.png\)
2126
@@ -47,6 +52,7 @@ This extension contributes the following settings:
4752
These plans are very much a wishlist that may or may not ever be completed. Feel free to create issues and/or pull requests to add features.
4853

4954
- add more regular expressions
55+
- remove any curly quotes, commas, etc and replace them with the straight versions
5056
- add the ability to combine multiple regular expressions in sequence
5157
- [set up webpack to reduce the size of the extension](https://code.visualstudio.com/api/working-with-extensions/bundling-extension)
5258
<!-- - [publish the extension](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) -->
@@ -67,22 +73,31 @@ These plans are very much a wishlist that may or may not ever be completed. Feel
6773

6874
## Known Issues
6975

70-
At the moment there are no known issues
76+
<!-- At the moment there are no known issues -->
77+
- for some reason the regex is not completing as expected
78+
<!-- - this might be an issue with the string String difference as it was working before I changed it -->
7179

7280
-----------------------------------------------------------------------------------------------------------
7381

7482
## Release Notes
7583

76-
### 0.0.1
84+
### 0.0.0002
85+
86+
- updated
87+
- minor changes to the README
88+
- one regex statement in extension.ts to match the others
89+
- added known bug
90+
- changed the release versioning
91+
92+
### 0.0.0001
7793

7894
Initial release of PasteRegEx
7995

8096
Includes:
8197

8298
- apply regular expression to selected text
83-
- implimented the following commands
99+
- implemented the following commands
84100
- rmHangingSpaces
85101
- rmNewLines
86102
- rmHyphenLineEnd
87103
- rmSentenceBreaks
88-

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "pasteregex",
33
"displayName": "PasteRegEx",
44
"description": "This extension allows you to run a regex statement on your clipboard text before pasting that text content",
5-
"version": "0.0.1",
5+
"version": "0.0.0002",
66
"publisher": "ldsands",
77
"author": {
88
"name": "Levi Sands"
@@ -43,11 +43,11 @@
4343
},
4444
{
4545
"command": "PasteRegEx.rmHyphenLineEnd",
46-
"title": "PasteRegEx: Remove New Lines"
46+
"title": "PasteRegEx: Remove Hyphen word break"
4747
},
4848
{
4949
"command": "PasteRegEx.rmSentenceBreaks",
50-
"title": "PasteRegEx: Remove New Lines"
50+
"title": "PasteRegEx: Remove newlines in mid-sentence"
5151
}
5252
]
5353
},

src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export function activate(context: vscode.ExtensionContext) {
4949
var selectionText: String = getSelectedText();
5050
let editor = vscode.window.activeTextEditor;
5151
let RegEx = new RegExp("\n", "gm")
52-
var modifiedString: string = selectionText.replace(RegEx, " ");
52+
var modifiedString: string = selectionText.replace("/\n/gm", " ");
5353
insertNewString(modifiedString)
5454
});
5555

0 commit comments

Comments
 (0)