Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: rewrite in TS, start using named exports
- Loading branch information
Showing
21 changed files
with
284 additions
and
104 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
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
2 changes: 1 addition & 1 deletion
2
packages/regex-empty-conditional-comments/coverage/coverage-summary.json
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 |
---|---|---|
@@ -1 +1 @@ | ||
{"total":{"lines":{"total":1,"covered":1,"skipped":0,"pct":100},"statements":{"total":2,"covered":2,"skipped":0,"pct":100},"functions":{"total":1,"covered":1,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}}} | ||
{"total":{"lines":{"total":2,"covered":2,"skipped":0,"pct":100},"statements":{"total":2,"covered":2,"skipped":0,"pct":100},"functions":{"total":1,"covered":1,"skipped":0,"pct":100},"branches":{"total":0,"covered":0,"skipped":0,"pct":100}}} |
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
10 changes: 10 additions & 0 deletions
10
packages/regex-empty-conditional-comments/dist/regex-empty-conditional-comments.mjs
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,10 @@ | ||
/** | ||
* regex-empty-conditional-comments | ||
* Regular expression for matching HTML empty conditional comments | ||
* Version: 1.9.1 | ||
* Author: Roy Revelt, Codsen Ltd | ||
* License: MIT | ||
* Homepage: https://codsen.com/os/regex-empty-conditional-comments/ | ||
*/ | ||
|
||
var i="1.9.1";function n(){return/<!(--)?\[if[^\]]*]>[<>!-\s]*<!\[endif\]\1>/gi}export{n as emptyCondCommentRegex,i as version}; |
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
4 changes: 1 addition & 3 deletions
4
packages/regex-empty-conditional-comments/examples/_quickTake.js
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 |
---|---|---|
@@ -1 +1 @@ | ||
{"_quickTake.js":{"title":"Quick Take","content":"import { strict as assert } from \"assert\";\nimport emptyCondCommentRegex from \"regex-empty-conditional-comments\";\n\n// empty comment which was meant to target Outlook-only\nassert.equal(\n emptyCondCommentRegex().test(`<!--[if !mso]>\n<![endif]-->`),\n true\n);\n\n// empty comment which was meant to target non-Outlook-only\nassert.equal(\n emptyCondCommentRegex().test(`<!--[if !mso]><!-- -->\n<!--<![endif]-->`),\n true\n);\n\nassert.equal(\n emptyCondCommentRegex().test(`<!--[if !mso]><!-- -->\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />\n<!--<![endif]-->`),\n false\n);\n\nassert.equal(\n emptyCondCommentRegex().test(`<!--[if gte mso 9]><xml>\n<o:OfficeDocumentSettings>\n<o:AllowPNG/>\n<o:PixelsPerInch>96</o:PixelsPerInch>\n</o:OfficeDocumentSettings>\n</xml><![endif]-->`),\n false\n);\n\nassert.equal(\n emptyCondCommentRegex().exec(\"<html><!--[if !mso]><![endif]--><title>\")[0],\n \"<!--[if !mso]><![endif]-->\"\n);\n\nassert.deepEqual(\n `<html> <!--[if !mso]><![endif]--> <title>text</title> <!--[if gte mso 9]>\n<xml>\n<![endif]-->`.match(emptyCondCommentRegex()),\n [\"<!--[if !mso]><![endif]-->\"]\n);"}} | ||
{"_quickTake.js":{"title":"Quick Take","content":"import { strict as assert } from \"assert\";\nimport { emptyCondCommentRegex } from \"regex-empty-conditional-comments\";\n\n// empty comment which was meant to target Outlook-only\nassert.equal(\n emptyCondCommentRegex().test(`<!--[if !mso]>\n<![endif]-->`),\n true\n);\n\n// empty comment which was meant to target non-Outlook-only\nassert.equal(\n emptyCondCommentRegex().test(`<!--[if !mso]><!-- -->\n<!--<![endif]-->`),\n true\n);\n\nassert.equal(\n emptyCondCommentRegex().test(`<!--[if !mso]><!-- -->\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />\n<!--<![endif]-->`),\n false\n);\n\nassert.equal(\n emptyCondCommentRegex().test(`<!--[if gte mso 9]><xml>\n<o:OfficeDocumentSettings>\n<o:AllowPNG/>\n<o:PixelsPerInch>96</o:PixelsPerInch>\n</o:OfficeDocumentSettings>\n</xml><![endif]-->`),\n false\n);\n\nassert.equal(\n emptyCondCommentRegex().exec(\"<html><!--[if !mso]><![endif]--><title>\")[0],\n \"<!--[if !mso]><![endif]-->\"\n);\n\nassert.deepEqual(\n `<html> <!--[if !mso]><![endif]--> <title>text</title> <!--[if gte mso 9]>\n<xml>\n<![endif]-->`.match(emptyCondCommentRegex()),\n [\"<!--[if !mso]><![endif]-->\"]\n);"}} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.