@yozora/tokenizer-html-block 2.0.0-alpha.2 → 2.0.1
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 +2 -2
- package/lib/esm/index.js +3 -3
- package/lib/types/types.d.ts +2 -2
- package/package.json +5 -5
package/lib/cjs/index.js
CHANGED
|
@@ -364,8 +364,8 @@ const match = function () {
|
|
|
364
364
|
const token = {
|
|
365
365
|
nodeType: ast.HtmlType,
|
|
366
366
|
position: {
|
|
367
|
-
start: coreTokenizer.
|
|
368
|
-
end: coreTokenizer.
|
|
367
|
+
start: coreTokenizer.calcStartPoint(nodePoints, startIndex),
|
|
368
|
+
end: coreTokenizer.calcEndPoint(nodePoints, nextIndex - 1),
|
|
369
369
|
},
|
|
370
370
|
condition,
|
|
371
371
|
lines: [line],
|
package/lib/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isAsciiLetter, AsciiCodePoint, isAsciiDigitCharacter, isWhitespaceCharacter, calcStringFromNodePoints, isAsciiUpperLetter } from '@yozora/character';
|
|
2
|
-
import { eatOptionalWhitespaces,
|
|
2
|
+
import { eatOptionalWhitespaces, calcStartPoint, calcEndPoint, mergeContentLinesFaithfully, BaseBlockTokenizer, TokenizerPriority } from '@yozora/core-tokenizer';
|
|
3
3
|
import { HtmlType } from '@yozora/ast';
|
|
4
4
|
|
|
5
5
|
function eatHTMLAttribute(nodePoints, startIndex, endIndex) {
|
|
@@ -360,8 +360,8 @@ const match = function () {
|
|
|
360
360
|
const token = {
|
|
361
361
|
nodeType: HtmlType,
|
|
362
362
|
position: {
|
|
363
|
-
start:
|
|
364
|
-
end:
|
|
363
|
+
start: calcStartPoint(nodePoints, startIndex),
|
|
364
|
+
end: calcEndPoint(nodePoints, nextIndex - 1),
|
|
365
365
|
},
|
|
366
366
|
condition,
|
|
367
367
|
lines: [line],
|
package/lib/types/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Html, HtmlType } from '@yozora/ast';
|
|
2
2
|
import type { IBaseBlockTokenizerProps, IPartialYastBlockToken, IPhrasingContentLine, ITokenizer } from '@yozora/core-tokenizer';
|
|
3
3
|
export declare type T = HtmlType;
|
|
4
|
-
export declare type INode =
|
|
4
|
+
export declare type INode = Html;
|
|
5
5
|
export declare const uniqueName = "@yozora/tokenizer-html-block";
|
|
6
6
|
export declare type HtmlBlockConditionType = 1 | 2 | 3 | 4 | 5 | 6 | 7;
|
|
7
7
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yozora/tokenizer-html-block",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
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.
|
|
39
|
-
"@yozora/character": "^2.0.
|
|
40
|
-
"@yozora/core-tokenizer": "^2.0.
|
|
38
|
+
"@yozora/ast": "^2.0.1",
|
|
39
|
+
"@yozora/character": "^2.0.1",
|
|
40
|
+
"@yozora/core-tokenizer": "^2.0.1"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "3aea33091e402bd6c7754d91d549e8d648475073"
|
|
43
43
|
}
|