-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved RegEx. More forgiving switch statements
- Loading branch information
Max van der Schee
committed
Nov 16, 2018
1 parent
9f67765
commit 21966ce
Showing
8 changed files
with
68 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# CHANGELOG | ||
## Version 0.1.1 | ||
* Moved RegEx patterns to Patterns.ts | ||
* Refactored RegEx to be more readable | ||
* Changed switch statements to be more forgiving with typos | ||
|
||
## Version 0.1.0 | ||
* Added RegEx search qeuries for `<div>, <span>, <a>, <img>, <meta>, <html>` | ||
* Added messages for above coding errors | ||
|
||
## Version 0.0.2 | ||
* Changed extension type to `language-server` | ||
|
||
## Version 0.0.1 | ||
* Auto-generated extension for Visual Studio Code with [Yocode](https://code.visualstudio.com/docs/extensions/yocode) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/*! Patterns.ts | ||
* Flamingos are pretty badass! | ||
* Copyright (c) 2018 Max van der Schee; Licensed MIT */ | ||
|
||
// Order based om most common types first | ||
const patterns: string[] = [ | ||
"<div(?:[\\s\\S]*?[^-?])>", | ||
"<span(?:[\\s\\S]*?[^-?])>", | ||
"<a(?:.|\\n)*?>(?:.|\\n)*?<\/a>", | ||
"<img(?:[\\s\\S]*?[^-?])>", | ||
"<meta(?:[\\s\\S]*?[^-?])>", | ||
"<html(?:[\\s\\S]*?[^-?])>" | ||
]; | ||
|
||
export const pattern: RegExp = new RegExp(patterns.join('|'), 'ig'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters