@docusaurus/plugin-content-blog 0.0.0-4458 → 0.0.0-4465

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,6 @@
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  const blogUtils_1 = require("./blogUtils");
10
- const loader_utils_1 = require("loader-utils");
11
10
  function markdownLoader(source) {
12
11
  const filePath = this.resourcePath;
13
12
  const fileString = source;
@@ -21,7 +20,7 @@ function markdownLoader(source) {
21
20
  });
22
21
  // Truncate content if requested (e.g: file.md?truncated=true).
23
22
  const truncated = this.resourceQuery
24
- ? !!(0, loader_utils_1.parseQuery)(this.resourceQuery).truncated
23
+ ? !!new URLSearchParams(this.resourceQuery.slice(1)).get('truncated')
25
24
  : undefined;
26
25
  if (truncated) {
27
26
  finalContent = (0, blogUtils_1.truncate)(finalContent, markdownLoaderOptions.truncateMarker);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/plugin-content-blog",
3
- "version": "0.0.0-4458",
3
+ "version": "0.0.0-4465",
4
4
  "description": "Blog plugin for Docusaurus.",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/plugin-content-blog.d.ts",
@@ -18,16 +18,13 @@
18
18
  },
19
19
  "license": "MIT",
20
20
  "dependencies": {
21
- "@docusaurus/core": "0.0.0-4458",
22
- "@docusaurus/logger": "0.0.0-4458",
23
- "@docusaurus/mdx-loader": "0.0.0-4458",
24
- "@docusaurus/utils": "0.0.0-4458",
25
- "@docusaurus/utils-validation": "0.0.0-4458",
26
- "escape-string-regexp": "^4.0.0",
21
+ "@docusaurus/core": "0.0.0-4465",
22
+ "@docusaurus/logger": "0.0.0-4465",
23
+ "@docusaurus/mdx-loader": "0.0.0-4465",
24
+ "@docusaurus/utils": "0.0.0-4465",
25
+ "@docusaurus/utils-validation": "0.0.0-4465",
27
26
  "feed": "^4.2.2",
28
27
  "fs-extra": "^10.0.0",
29
- "globby": "^11.0.2",
30
- "loader-utils": "^2.0.0",
31
28
  "lodash": "^4.17.20",
32
29
  "reading-time": "^1.5.0",
33
30
  "remark-admonitions": "^1.2.1",
@@ -36,7 +33,8 @@
36
33
  "webpack": "^5.61.0"
37
34
  },
38
35
  "devDependencies": {
39
- "@docusaurus/types": "0.0.0-4458"
36
+ "@docusaurus/types": "0.0.0-4465",
37
+ "escape-string-regexp": "^4.0.0"
40
38
  },
41
39
  "peerDependencies": {
42
40
  "react": "^16.8.4 || ^17.0.0",
@@ -45,5 +43,5 @@
45
43
  "engines": {
46
44
  "node": ">=14"
47
45
  },
48
- "gitHead": "38e7bfd3584608cf9d5b3c3d15f431efe755cd28"
46
+ "gitHead": "1bbf0f9d51d029322461a5231894c069bf7264a1"
49
47
  }
@@ -6,7 +6,6 @@
6
6
  */
7
7
 
8
8
  import {truncate, linkify} from './blogUtils';
9
- import {parseQuery} from 'loader-utils';
10
9
  import type {BlogMarkdownLoaderOptions} from './types';
11
10
  import type {LoaderContext} from 'webpack';
12
11
 
@@ -28,7 +27,7 @@ export default function markdownLoader(
28
27
 
29
28
  // Truncate content if requested (e.g: file.md?truncated=true).
30
29
  const truncated: boolean | undefined = this.resourceQuery
31
- ? !!parseQuery(this.resourceQuery).truncated
30
+ ? !!new URLSearchParams(this.resourceQuery.slice(1)).get('truncated')
32
31
  : undefined;
33
32
 
34
33
  if (truncated) {