@yozora/tokenizer-table 2.0.0-alpha.2 → 2.0.0-alpha.3
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 +0 -4
- package/lib/esm/index.js +0 -4
- package/lib/types/types.d.ts +4 -4
- package/package.json +5 -5
package/lib/cjs/index.js
CHANGED
|
@@ -7,7 +7,6 @@ var character = require('@yozora/character');
|
|
|
7
7
|
var coreTokenizer = require('@yozora/core-tokenizer');
|
|
8
8
|
|
|
9
9
|
const match = function (api) {
|
|
10
|
-
const { name: _tokenizer } = this;
|
|
11
10
|
return {
|
|
12
11
|
isContainingBlock: false,
|
|
13
12
|
eatOpener,
|
|
@@ -170,7 +169,6 @@ const match = function (api) {
|
|
|
170
169
|
},
|
|
171
170
|
];
|
|
172
171
|
const cell = {
|
|
173
|
-
_tokenizer,
|
|
174
172
|
nodeType: ast.TableCellType,
|
|
175
173
|
position: { start: startPoint, end: endPoint },
|
|
176
174
|
lines: lines,
|
|
@@ -183,7 +181,6 @@ const match = function (api) {
|
|
|
183
181
|
const endPoint = coreTokenizer.calcEndYastNodePoint(nodePoints, endIndex - 1);
|
|
184
182
|
for (let c = cells.length; c < columns.length; ++c) {
|
|
185
183
|
const cell = {
|
|
186
|
-
_tokenizer,
|
|
187
184
|
nodeType: ast.TableCellType,
|
|
188
185
|
position: { start: Object.assign({}, endPoint), end: Object.assign({}, endPoint) },
|
|
189
186
|
lines: [],
|
|
@@ -191,7 +188,6 @@ const match = function (api) {
|
|
|
191
188
|
cells.push(cell);
|
|
192
189
|
}
|
|
193
190
|
const row = {
|
|
194
|
-
_tokenizer,
|
|
195
191
|
nodeType: ast.TableRowType,
|
|
196
192
|
position: { start: startPoint, end: endPoint },
|
|
197
193
|
cells,
|
package/lib/esm/index.js
CHANGED
|
@@ -3,7 +3,6 @@ import { AsciiCodePoint, isWhitespaceCharacter } from '@yozora/character';
|
|
|
3
3
|
import { calcStartYastNodePoint, calcEndYastNodePoint, mergeAndStripContentLines, BaseBlockTokenizer, TokenizerPriority } from '@yozora/core-tokenizer';
|
|
4
4
|
|
|
5
5
|
const match = function (api) {
|
|
6
|
-
const { name: _tokenizer } = this;
|
|
7
6
|
return {
|
|
8
7
|
isContainingBlock: false,
|
|
9
8
|
eatOpener,
|
|
@@ -166,7 +165,6 @@ const match = function (api) {
|
|
|
166
165
|
},
|
|
167
166
|
];
|
|
168
167
|
const cell = {
|
|
169
|
-
_tokenizer,
|
|
170
168
|
nodeType: TableCellType,
|
|
171
169
|
position: { start: startPoint, end: endPoint },
|
|
172
170
|
lines: lines,
|
|
@@ -179,7 +177,6 @@ const match = function (api) {
|
|
|
179
177
|
const endPoint = calcEndYastNodePoint(nodePoints, endIndex - 1);
|
|
180
178
|
for (let c = cells.length; c < columns.length; ++c) {
|
|
181
179
|
const cell = {
|
|
182
|
-
_tokenizer,
|
|
183
180
|
nodeType: TableCellType,
|
|
184
181
|
position: { start: Object.assign({}, endPoint), end: Object.assign({}, endPoint) },
|
|
185
182
|
lines: [],
|
|
@@ -187,7 +184,6 @@ const match = function (api) {
|
|
|
187
184
|
cells.push(cell);
|
|
188
185
|
}
|
|
189
186
|
const row = {
|
|
190
|
-
_tokenizer,
|
|
191
187
|
nodeType: TableRowType,
|
|
192
188
|
position: { start: startPoint, end: endPoint },
|
|
193
189
|
cells,
|
package/lib/types/types.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { NodePosition, Table, TableCellType, TableColumn, TableRowType, TableType } from '@yozora/ast';
|
|
2
2
|
import type { IBaseBlockTokenizerProps, IPartialYastBlockToken, IPhrasingContentLine, ITokenizer } from '@yozora/core-tokenizer';
|
|
3
3
|
export declare type T = TableType;
|
|
4
|
-
export declare type INode =
|
|
4
|
+
export declare type INode = Table;
|
|
5
5
|
export declare const uniqueName = "@yozora/tokenizer-table";
|
|
6
6
|
export interface IToken extends IPartialYastBlockToken<TableType> {
|
|
7
7
|
/**
|
|
8
8
|
* Table column configuration items
|
|
9
9
|
*/
|
|
10
|
-
columns:
|
|
10
|
+
columns: TableColumn[];
|
|
11
11
|
/**
|
|
12
12
|
* Table rows
|
|
13
13
|
*/
|
|
@@ -19,6 +19,6 @@ export interface ITableRowToken extends IPartialYastBlockToken<TableRowType> {
|
|
|
19
19
|
cells: ITableCellToken[];
|
|
20
20
|
}
|
|
21
21
|
export interface ITableCellToken extends IPartialYastBlockToken<TableCellType> {
|
|
22
|
-
position:
|
|
22
|
+
position: NodePosition;
|
|
23
23
|
lines: IPhrasingContentLine[];
|
|
24
24
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yozora/tokenizer-table",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.3",
|
|
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.
|
|
39
|
-
"@yozora/character": "^2.0.0-alpha.
|
|
40
|
-
"@yozora/core-tokenizer": "^2.0.0-alpha.
|
|
38
|
+
"@yozora/ast": "^2.0.0-alpha.3",
|
|
39
|
+
"@yozora/character": "^2.0.0-alpha.3",
|
|
40
|
+
"@yozora/core-tokenizer": "^2.0.0-alpha.3"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "9f274fc7487a8c1dd213405d92508f9a7621f730"
|
|
43
43
|
}
|