@yozora/tokenizer-blockquote 2.0.0-alpha.1 → 2.0.0-alpha.2

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.
package/lib/cjs/index.js CHANGED
@@ -68,12 +68,10 @@ const match = function () {
68
68
  const parse = function (api) {
69
69
  return {
70
70
  parse: tokens => tokens.map(token => {
71
- const children = token.children ? api.parseBlockTokens(token.children) : [];
72
- const node = {
73
- type: ast.BlockquoteType,
74
- position: token.position,
75
- children,
76
- };
71
+ const children = api.parseBlockTokens(token.children);
72
+ const node = api.shouldReservePosition
73
+ ? { type: ast.BlockquoteType, position: token.position, children }
74
+ : { type: ast.BlockquoteType, children };
77
75
  return node;
78
76
  }),
79
77
  };
package/lib/esm/index.js CHANGED
@@ -64,12 +64,10 @@ const match = function () {
64
64
  const parse = function (api) {
65
65
  return {
66
66
  parse: tokens => tokens.map(token => {
67
- const children = token.children ? api.parseBlockTokens(token.children) : [];
68
- const node = {
69
- type: BlockquoteType,
70
- position: token.position,
71
- children,
72
- };
67
+ const children = api.parseBlockTokens(token.children);
68
+ const node = api.shouldReservePosition
69
+ ? { type: BlockquoteType, position: token.position, children }
70
+ : { type: BlockquoteType, children };
73
71
  return node;
74
72
  }),
75
73
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yozora/tokenizer-blockquote",
3
- "version": "2.0.0-alpha.1",
3
+ "version": "2.0.0-alpha.2",
4
4
  "author": {
5
5
  "name": "guanghechen",
6
6
  "url": "https://github.com/guanghechen/"
@@ -35,9 +35,9 @@
35
35
  "test": "cross-env TS_NODE_FILES=true jest --config ../../jest.config.js --rootDir ."
36
36
  },
37
37
  "dependencies": {
38
- "@yozora/ast": "^2.0.0-alpha.1",
39
- "@yozora/character": "^2.0.0-alpha.1",
40
- "@yozora/core-tokenizer": "^2.0.0-alpha.1"
38
+ "@yozora/ast": "^2.0.0-alpha.2",
39
+ "@yozora/character": "^2.0.0-alpha.2",
40
+ "@yozora/core-tokenizer": "^2.0.0-alpha.2"
41
41
  },
42
- "gitHead": "86202e1d2b03ccfc2ab030517d9d314f7aee7666"
42
+ "gitHead": "da59d85520455c59a117a35032ef1a035c10ea21"
43
43
  }