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 and start using named exports
BREAKING CHANGE: previously: "import isJinjaSpecific from ..." - now "import { isJinjaSpecific } from ..."
- Loading branch information
Showing
21 changed files
with
326 additions
and
114 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
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-jinja-specific/dist/regex-jinja-specific.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-jinja-specific | ||
* Regular expression for detecting Python-specific Jinja code | ||
* Version: 1.0.1 | ||
* Author: Roy Revelt, Codsen Ltd | ||
* License: MIT | ||
* Homepage: https://codsen.com/os/regex-jinja-specific/ | ||
*/ | ||
|
||
var s="1.0.1";function e(){return/(set\s*[\w]+\s*=\s*namespace\()|({{['"][\w]+['"]\s+if)|(['"]%x?[+0]?[.>^<]?\d+[\w%]['"]\|format\()/gi}export{e as isJinjaSpecific,s 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
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 isJinjaSpecific from \"regex-jinja-specific\";\n\nassert.equal(\n isJinjaSpecific().test(`<div>{{ '%.2f'|format(3.1415926) }}</div>`),\n true\n);\n\n// in case of ambiguous, Nunjucks-or-Jinja code\nassert.equal(isJinjaSpecific().test(`<div>{{ value }}</div>`), false);"}} | ||
{"_quickTake.js":{"title":"Quick Take","content":"import { strict as assert } from \"assert\";\nimport { isJinjaSpecific } from \"regex-jinja-specific\";\n\nassert.equal(\n isJinjaSpecific().test(`<div>{{ '%.2f'|format(3.1415926) }}</div>`),\n true\n);\n\n// in case of ambiguous, Nunjucks-or-Jinja code\nassert.equal(isJinjaSpecific().test(`<div>{{ value }}</div>`), false);"}} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"1.0.0": 838603014.0223383, | ||
"lastPublished": 838603014.0223383, | ||
"lastRan": 838603014.0223383 | ||
"1.0.1": 869555740.9914198, | ||
"lastPublished": 869555740.9914198, | ||
"lastRan": 869555740.9914198 | ||
} |
Oops, something went wrong.