@yozora/tokenizer-inline-math 2.0.2 → 2.0.4
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/LICENSE +1 -1
- package/package.json +7 -7
- package/lib/types/match.d.ts +0 -3
- package/lib/types/parse.d.ts +0 -3
- package/lib/types/tokenizer.d.ts +0 -12
- package/lib/types/types.d.ts +0 -34
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2020-
|
|
3
|
+
Copyright (c) 2020-2022 guanghechen (me.guanghechen@gmail.com)
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yozora/tokenizer-inline-math",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "Tokenizer for processing inline math (formulas)",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "guanghechen",
|
|
@@ -40,17 +40,17 @@
|
|
|
40
40
|
],
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "cross-env NODE_ENV=production rollup -c ../../rollup.config.js",
|
|
43
|
-
"prebuild": "rimraf lib/
|
|
43
|
+
"prebuild": "rimraf lib/",
|
|
44
44
|
"prepublishOnly": "cross-env ROLLUP_SHOULD_SOURCEMAP=false yarn build",
|
|
45
45
|
"test": "cross-env TS_NODE_FILES=true jest --config ../../jest.config.js --rootDir ."
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@yozora/ast": "^2.0.
|
|
49
|
-
"@yozora/character": "^2.0.
|
|
50
|
-
"@yozora/core-tokenizer": "^2.0.
|
|
48
|
+
"@yozora/ast": "^2.0.4",
|
|
49
|
+
"@yozora/character": "^2.0.4",
|
|
50
|
+
"@yozora/core-tokenizer": "^2.0.4"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@yozora/tokenizer-inline-code": "^2.0.
|
|
53
|
+
"@yozora/tokenizer-inline-code": "^2.0.4"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "c980b95254394dcacba0cbb4bea251350b09397c"
|
|
56
56
|
}
|
package/lib/types/match.d.ts
DELETED
package/lib/types/parse.d.ts
DELETED
package/lib/types/tokenizer.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { IInlineTokenizer, IMatchInlineHookCreator, IParseInlineHookCreator } from '@yozora/core-tokenizer';
|
|
2
|
-
import { BaseInlineTokenizer } from '@yozora/core-tokenizer';
|
|
3
|
-
import type { IDelimiter, INode, IThis, IToken, ITokenizerProps, T } from './types';
|
|
4
|
-
/**
|
|
5
|
-
* Lexical Analyzer for inlineMath.
|
|
6
|
-
*/
|
|
7
|
-
export declare class InlineMathTokenizer extends BaseInlineTokenizer<T, IDelimiter, IToken, INode, IThis> implements IInlineTokenizer<T, IDelimiter, IToken, INode, IThis> {
|
|
8
|
-
readonly backtickRequired: boolean;
|
|
9
|
-
constructor(props?: ITokenizerProps);
|
|
10
|
-
readonly match: IMatchInlineHookCreator<T, IDelimiter, IToken, IThis>;
|
|
11
|
-
readonly parse: IParseInlineHookCreator<T, IToken, INode, IThis>;
|
|
12
|
-
}
|
package/lib/types/types.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { InlineMath, InlineMathType } from '@yozora/ast';
|
|
2
|
-
import type { IBaseInlineTokenizerProps, IPartialYastInlineToken, ITokenizer, IYastTokenDelimiter } from '@yozora/core-tokenizer';
|
|
3
|
-
export declare type T = InlineMathType;
|
|
4
|
-
export declare type INode = InlineMath;
|
|
5
|
-
export declare const uniqueName = "@yozora/tokenizer-inline-math";
|
|
6
|
-
export interface IToken extends IPartialYastInlineToken<T> {
|
|
7
|
-
/**
|
|
8
|
-
* Thickness of the InlineMathDelimiter
|
|
9
|
-
*/
|
|
10
|
-
thickness: number;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* IDelimiter of InlineMathToken.
|
|
14
|
-
*/
|
|
15
|
-
export interface IDelimiter extends IYastTokenDelimiter {
|
|
16
|
-
type: 'full';
|
|
17
|
-
/**
|
|
18
|
-
* Thickness of the InlineMathDelimiter
|
|
19
|
-
*/
|
|
20
|
-
thickness: number;
|
|
21
|
-
}
|
|
22
|
-
export interface IThis extends ITokenizer {
|
|
23
|
-
/**
|
|
24
|
-
* Whether if the backtick mark wrapping necessary.
|
|
25
|
-
*/
|
|
26
|
-
readonly backtickRequired: boolean;
|
|
27
|
-
}
|
|
28
|
-
export interface ITokenizerProps extends Partial<IBaseInlineTokenizerProps> {
|
|
29
|
-
/**
|
|
30
|
-
* Whether if the backtick mark wrapping necessary.
|
|
31
|
-
* @default true
|
|
32
|
-
*/
|
|
33
|
-
readonly backtickRequired?: boolean;
|
|
34
|
-
}
|