hexo-reslink
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -1,8 +0,8 @@ | ||
const npm = require("./dist/lib/npm"); | ||
const transform = require("./dist/lib/transform"); | ||
hexo.extend.filter.register('before_post_render', function (data){ | ||
hexo.extend.filter.register('before_post_render', function (data) { | ||
data.content = npm.process(data.content); | ||
data.content = transform(data.content); | ||
return data; | ||
}); |
@@ -1,2 +0,3 @@ | ||
export const REG = /npm:((?:@?[a-z\d_-]+\/)?[a-z\d._-]+)/; | ||
export const REG = | ||
/npm:((?:@?[a-z\d][a-z\d_-]*[a-z\d]\/)?[a-z\d][a-z\d._-]*[a-z\d])/; | ||
@@ -3,0 +4,0 @@ export const process = (text: string) => { |
{ | ||
"name": "hexo-reslink", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Automatically create resource links", | ||
@@ -10,3 +10,2 @@ "main": "index.js", | ||
"build": "npm run tsc", | ||
"prepublish": "npm run test", | ||
"pretest": "npm run clean&&npm run build", | ||
@@ -22,3 +21,4 @@ "test-spec": "mocha", | ||
"README.md", | ||
"LICENSE" | ||
"LICENSE", | ||
"tsconfig.json" | ||
], | ||
@@ -60,3 +60,5 @@ "repository": { | ||
}, | ||
"dependencies": {} | ||
"dependencies": { | ||
"markdown-to-ast": "^6.0.2" | ||
} | ||
} |
@@ -21,6 +21,6 @@ # hexo-reslink | ||
Here is content of `a.md` | ||
Here is content of `example.md` | ||
```markdown | ||
The npm:hexo is a very nice framework. | ||
The npm:hexo is a very nice framework. Its homepage is github:hexojs/hexo. | ||
``` | ||
@@ -30,6 +30,6 @@ | ||
`a.md` will be transformed as: | ||
`example.md` will be transformed as: | ||
```markdown | ||
The [hexo](https://www.npmjs.com/package/hexo) is a very nice framework. | ||
The [hexo](https://www.npmjs.com/package/hexo) is a very nice framework. Its homepage is [hexojs/hexo](https://github.com/hexojs/hexo). | ||
``` | ||
@@ -36,0 +36,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7423
1
8
84
+ Addedmarkdown-to-ast@^6.0.2
+ Added@textlint/ast-node-types@4.4.3(transitive)
+ Addedarray-buffer-byte-length@1.0.1(transitive)
+ Addedarraybuffer.prototype.slice@1.0.3(transitive)
+ Addedavailable-typed-arrays@1.0.7(transitive)
+ Addedbail@1.0.5(transitive)
+ Addedboundary@1.0.1(transitive)
+ Addedcall-bind@1.0.7(transitive)
+ Addedccount@1.1.0(transitive)
+ Addedcharacter-entities@1.2.4(transitive)
+ Addedcharacter-entities-html4@1.1.4(transitive)
+ Addedcharacter-entities-legacy@1.1.4(transitive)
+ Addedcharacter-reference-invalid@1.1.4(transitive)
+ Addedcollapse-white-space@1.0.6(transitive)
+ Addeddata-view-buffer@1.0.1(transitive)
+ Addeddata-view-byte-length@1.0.1(transitive)
+ Addeddata-view-byte-offset@1.0.0(transitive)
+ Addeddebug@2.6.9(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addeddefine-properties@1.2.1(transitive)
+ Addedes-abstract@1.23.5(transitive)
+ Addedes-define-property@1.0.0(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedes-object-atoms@1.0.0(transitive)
+ Addedes-set-tostringtag@2.0.3(transitive)
+ Addedes-to-primitive@1.3.0(transitive)
+ Addedextend@3.0.2(transitive)
+ Addedfor-each@0.3.3(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedfunction.prototype.name@1.1.6(transitive)
+ Addedfunctions-have-names@1.2.3(transitive)
+ Addedget-intrinsic@1.2.4(transitive)
+ Addedget-symbol-description@1.0.2(transitive)
+ Addedglobalthis@1.0.4(transitive)
+ Addedgopd@1.0.1(transitive)
+ Addedhas@1.0.4(transitive)
+ Addedhas-bigints@1.0.2(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-proto@1.0.3(transitive)
+ Addedhas-symbols@1.0.3(transitive)
+ Addedhas-tostringtag@1.0.2(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedinternal-slot@1.0.7(transitive)
+ Addedis-alphabetical@1.0.4(transitive)
+ Addedis-alphanumeric@1.0.0(transitive)
+ Addedis-alphanumerical@1.0.4(transitive)
+ Addedis-array-buffer@3.0.4(transitive)
+ Addedis-async-function@2.0.0(transitive)
+ Addedis-bigint@1.0.4(transitive)
+ Addedis-boolean-object@1.1.2(transitive)
+ Addedis-buffer@1.1.6(transitive)
+ Addedis-callable@1.2.7(transitive)
+ Addedis-data-view@1.0.1(transitive)
+ Addedis-date-object@1.0.5(transitive)
+ Addedis-decimal@1.0.4(transitive)
+ Addedis-finalizationregistry@1.1.0(transitive)
+ Addedis-generator-function@1.0.10(transitive)
+ Addedis-hexadecimal@1.0.4(transitive)
+ Addedis-map@2.0.3(transitive)
+ Addedis-negative-zero@2.0.3(transitive)
+ Addedis-number-object@1.0.7(transitive)
+ Addedis-plain-obj@1.1.0(transitive)
+ Addedis-regex@1.1.4(transitive)
+ Addedis-set@2.0.3(transitive)
+ Addedis-shared-array-buffer@1.0.3(transitive)
+ Addedis-string@1.0.7(transitive)
+ Addedis-symbol@1.0.4(transitive)
+ Addedis-typed-array@1.1.13(transitive)
+ Addedis-weakmap@2.0.2(transitive)
+ Addedis-weakref@1.0.2(transitive)
+ Addedis-weakset@2.0.3(transitive)
+ Addedis-whitespace-character@1.0.4(transitive)
+ Addedis-word-character@1.0.4(transitive)
+ Addedisarray@2.0.5(transitive)
+ Addedlongest-streak@2.0.4(transitive)
+ Addedmarkdown-escapes@1.0.4(transitive)
+ Addedmarkdown-table@1.1.3(transitive)
+ Addedmarkdown-to-ast@6.0.3(transitive)
+ Addedmdast-util-compact@1.0.4(transitive)
+ Addedms@2.0.0(transitive)
+ Addedobject-inspect@1.13.3(transitive)
+ Addedobject-keys@1.1.1(transitive)
+ Addedobject.assign@4.1.5(transitive)
+ Addedparse-entities@1.2.2(transitive)
+ Addedpossible-typed-array-names@1.0.0(transitive)
+ Addedreflect.getprototypeof@1.0.7(transitive)
+ Addedregexp.prototype.flags@1.5.3(transitive)
+ Addedremark@7.0.1(transitive)
+ Addedremark-parse@3.0.1(transitive)
+ Addedremark-stringify@3.0.1(transitive)
+ Addedrepeat-string@1.6.1(transitive)
+ Addedreplace-ext@1.0.0(transitive)
+ Addedsafe-array-concat@1.1.2(transitive)
+ Addedsafe-regex-test@1.0.3(transitive)
+ Addedset-function-length@1.2.2(transitive)
+ Addedset-function-name@2.0.2(transitive)
+ Addedside-channel@1.0.6(transitive)
+ Addedstate-toggle@1.0.3(transitive)
+ Addedstring.prototype.trim@1.2.9(transitive)
+ Addedstring.prototype.trimend@1.0.8(transitive)
+ Addedstring.prototype.trimstart@1.0.8(transitive)
+ Addedstringify-entities@1.3.2(transitive)
+ Addedstructured-source@3.0.2(transitive)
+ Addedtraverse@0.6.10(transitive)
+ Addedtrim@0.0.1(transitive)
+ Addedtrim-trailing-lines@1.1.4(transitive)
+ Addedtrough@1.0.5(transitive)
+ Addedtyped-array-buffer@1.0.2(transitive)
+ Addedtyped-array-byte-length@1.0.1(transitive)
+ Addedtyped-array-byte-offset@1.0.3(transitive)
+ Addedtyped-array-length@1.0.7(transitive)
+ Addedtypedarray.prototype.slice@1.0.3(transitive)
+ Addedunbox-primitive@1.0.2(transitive)
+ Addedunherit@1.1.3(transitive)
+ Addedunified@6.2.0(transitive)
+ Addedunist-util-is@3.0.0(transitive)
+ Addedunist-util-remove-position@1.1.4(transitive)
+ Addedunist-util-stringify-position@1.1.2(transitive)
+ Addedunist-util-visit@1.4.1(transitive)
+ Addedunist-util-visit-parents@2.1.2(transitive)
+ Addedvfile@2.3.0(transitive)
+ Addedvfile-location@2.0.6(transitive)
+ Addedvfile-message@1.1.1(transitive)
+ Addedwhich-boxed-primitive@1.0.2(transitive)
+ Addedwhich-builtin-type@1.2.0(transitive)
+ Addedwhich-collection@1.0.2(transitive)
+ Addedwhich-typed-array@1.1.16(transitive)
+ Addedx-is-string@0.1.0(transitive)
+ Addedxtend@4.0.2(transitive)