@yozora/tokenizer-inline-math 2.0.1 → 2.0.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/README.md +45 -45
- package/lib/types/index.d.ts +51 -5
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<header>
|
|
4
4
|
<h1 align="center">
|
|
5
|
-
<a href="https://github.com/yozorajs/yozora/tree/
|
|
5
|
+
<a href="https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/inline-math#readme">@yozora/tokenizer-inline-math</a>
|
|
6
6
|
</h1>
|
|
7
7
|
<div align="center">
|
|
8
8
|
<a href="https://www.npmjs.com/package/@yozora/tokenizer-inline-math">
|
|
@@ -187,53 +187,53 @@ Name | Type | Required | Default
|
|
|
187
187
|
|
|
188
188
|
[live-examples]: https://yozora.guanghechen.com/docs/package/tokenizer-inline-math#live-examples
|
|
189
189
|
[docpage]: https://yozora.guanghechen.com/docs/package/tokenizer-inline-math
|
|
190
|
-
[homepage]: https://github.com/yozorajs/yozora/tree/
|
|
190
|
+
[homepage]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/inline-math#readme
|
|
191
191
|
[gfm-spec]: https://github.github.com/gfm
|
|
192
192
|
[mdast-homepage]: https://github.com/syntax-tree/mdast
|
|
193
193
|
|
|
194
|
-
[@yozora/ast]: https://github.com/yozorajs/yozora/tree/
|
|
195
|
-
[@yozora/ast-util]: https://github.com/yozorajs/yozora/tree/
|
|
196
|
-
[@yozora/character]: https://github.com/yozorajs/yozora/tree/
|
|
197
|
-
[@yozora/eslint-config]: https://github.com/yozorajs/yozora/tree/
|
|
198
|
-
[@yozora/core-parser]: https://github.com/yozorajs/yozora/tree/
|
|
199
|
-
[@yozora/core-tokenizer]: https://github.com/yozorajs/yozora/tree/
|
|
200
|
-
[@yozora/invariant]: https://github.com/yozorajs/yozora/tree/
|
|
201
|
-
[@yozora/jest-for-tokenizer]: https://github.com/yozorajs/yozora/tree/
|
|
202
|
-
[@yozora/parser]: https://github.com/yozorajs/yozora/tree/
|
|
203
|
-
[@yozora/parser-gfm]: https://github.com/yozorajs/yozora/tree/
|
|
204
|
-
[@yozora/parser-gfm-ex]: https://github.com/yozorajs/yozora/tree/
|
|
205
|
-
[@yozora/template-tokenizer]: https://github.com/yozorajs/yozora/tree/
|
|
206
|
-
[@yozora/tokenizer-admonition]: https://github.com/yozorajs/yozora/tree/
|
|
207
|
-
[@yozora/tokenizer-autolink]: https://github.com/yozorajs/yozora/tree/
|
|
208
|
-
[@yozora/tokenizer-autolink-extension]: https://github.com/yozorajs/yozora/tree/
|
|
209
|
-
[@yozora/tokenizer-blockquote]: https://github.com/yozorajs/yozora/tree/
|
|
210
|
-
[@yozora/tokenizer-break]: https://github.com/yozorajs/yozora/tree/
|
|
211
|
-
[@yozora/tokenizer-definition]: https://github.com/yozorajs/yozora/tree/
|
|
212
|
-
[@yozora/tokenizer-delete]: https://github.com/yozorajs/yozora/tree/
|
|
213
|
-
[@yozora/tokenizer-ecma-import]: https://github.com/yozorajs/yozora/tree/
|
|
214
|
-
[@yozora/tokenizer-emphasis]: https://github.com/yozorajs/yozora/tree/
|
|
215
|
-
[@yozora/tokenizer-fenced-block]: https://github.com/yozorajs/yozora/tree/
|
|
216
|
-
[@yozora/tokenizer-fenced-code]: https://github.com/yozorajs/yozora/tree/
|
|
217
|
-
[@yozora/tokenizer-footnote]: https://github.com/yozorajs/yozora/tree/
|
|
218
|
-
[@yozora/tokenizer-footnote-definition]: https://github.com/yozorajs/yozora/tree/
|
|
219
|
-
[@yozora/tokenizer-footnote-reference]: https://github.com/yozorajs/yozora/tree/
|
|
220
|
-
[@yozora/tokenizer-heading]: https://github.com/yozorajs/yozora/tree/
|
|
221
|
-
[@yozora/tokenizer-html-block]: https://github.com/yozorajs/yozora/tree/
|
|
222
|
-
[@yozora/tokenizer-html-inline]: https://github.com/yozorajs/yozora/tree/
|
|
223
|
-
[@yozora/tokenizer-image]: https://github.com/yozorajs/yozora/tree/
|
|
224
|
-
[@yozora/tokenizer-image-reference]: https://github.com/yozorajs/yozora/tree/
|
|
225
|
-
[@yozora/tokenizer-indented-code]: https://github.com/yozorajs/yozora/tree/
|
|
226
|
-
[@yozora/tokenizer-inline-code]: https://github.com/yozorajs/yozora/tree/
|
|
227
|
-
[@yozora/tokenizer-inline-math]: https://github.com/yozorajs/yozora/tree/
|
|
228
|
-
[@yozora/tokenizer-link]: https://github.com/yozorajs/yozora/tree/
|
|
229
|
-
[@yozora/tokenizer-link-reference]: https://github.com/yozorajs/yozora/tree/
|
|
230
|
-
[@yozora/tokenizer-list]: https://github.com/yozorajs/yozora/tree/
|
|
231
|
-
[@yozora/tokenizer-math]: https://github.com/yozorajs/yozora/tree/
|
|
232
|
-
[@yozora/tokenizer-paragraph]: https://github.com/yozorajs/yozora/tree/
|
|
233
|
-
[@yozora/tokenizer-setext-heading]: https://github.com/yozorajs/yozora/tree/
|
|
234
|
-
[@yozora/tokenizer-table]: https://github.com/yozorajs/yozora/tree/
|
|
235
|
-
[@yozora/tokenizer-text]: https://github.com/yozorajs/yozora/tree/
|
|
236
|
-
[@yozora/tokenizer-thematic-break]: https://github.com/yozorajs/yozora/tree/
|
|
194
|
+
[@yozora/ast]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/ast#readme
|
|
195
|
+
[@yozora/ast-util]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/ast-util#readme
|
|
196
|
+
[@yozora/character]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/character#readme
|
|
197
|
+
[@yozora/eslint-config]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/eslint-config#readme
|
|
198
|
+
[@yozora/core-parser]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/core-parser#readme
|
|
199
|
+
[@yozora/core-tokenizer]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/core-tokenizer#readme
|
|
200
|
+
[@yozora/invariant]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/invariant#readme
|
|
201
|
+
[@yozora/jest-for-tokenizer]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/jest-for-tokenizer#readme
|
|
202
|
+
[@yozora/parser]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/parser#readme
|
|
203
|
+
[@yozora/parser-gfm]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/parser-gfm#readme
|
|
204
|
+
[@yozora/parser-gfm-ex]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/parser-gfm-ex#readme
|
|
205
|
+
[@yozora/template-tokenizer]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/template-tokenizer#readme
|
|
206
|
+
[@yozora/tokenizer-admonition]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/admonition#readme
|
|
207
|
+
[@yozora/tokenizer-autolink]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/autolink#readme
|
|
208
|
+
[@yozora/tokenizer-autolink-extension]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/autolink-extension#readme
|
|
209
|
+
[@yozora/tokenizer-blockquote]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/blockquote#readme
|
|
210
|
+
[@yozora/tokenizer-break]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/break#readme
|
|
211
|
+
[@yozora/tokenizer-definition]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/definition#readme
|
|
212
|
+
[@yozora/tokenizer-delete]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/delete#readme
|
|
213
|
+
[@yozora/tokenizer-ecma-import]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/ecma-import#readme
|
|
214
|
+
[@yozora/tokenizer-emphasis]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/emphasis#readme
|
|
215
|
+
[@yozora/tokenizer-fenced-block]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/fenced-block#readme
|
|
216
|
+
[@yozora/tokenizer-fenced-code]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/fenced-code#readme
|
|
217
|
+
[@yozora/tokenizer-footnote]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/footnote#readme
|
|
218
|
+
[@yozora/tokenizer-footnote-definition]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/footnote-definition#readme
|
|
219
|
+
[@yozora/tokenizer-footnote-reference]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/footnote-reference#readme
|
|
220
|
+
[@yozora/tokenizer-heading]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/heading#readme
|
|
221
|
+
[@yozora/tokenizer-html-block]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/html-block#readme
|
|
222
|
+
[@yozora/tokenizer-html-inline]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/html-inline#readme
|
|
223
|
+
[@yozora/tokenizer-image]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/image#readme
|
|
224
|
+
[@yozora/tokenizer-image-reference]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/image-reference#readme
|
|
225
|
+
[@yozora/tokenizer-indented-code]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/indented-code#readme
|
|
226
|
+
[@yozora/tokenizer-inline-code]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/inline-code#readme
|
|
227
|
+
[@yozora/tokenizer-inline-math]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/inline-math#readme
|
|
228
|
+
[@yozora/tokenizer-link]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/link#readme
|
|
229
|
+
[@yozora/tokenizer-link-reference]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/link-reference#readme
|
|
230
|
+
[@yozora/tokenizer-list]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/list#readme
|
|
231
|
+
[@yozora/tokenizer-math]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/math#readme
|
|
232
|
+
[@yozora/tokenizer-paragraph]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/paragraph#readme
|
|
233
|
+
[@yozora/tokenizer-setext-heading]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/setext-heading#readme
|
|
234
|
+
[@yozora/tokenizer-table]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/table#readme
|
|
235
|
+
[@yozora/tokenizer-text]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/text#readme
|
|
236
|
+
[@yozora/tokenizer-thematic-break]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/thematic-break#readme
|
|
237
237
|
|
|
238
238
|
[@yozora/react-admonition]: https://github.com/yozorajs/yozora-react/tree/main/packages/admonition#readme
|
|
239
239
|
[@yozora/react-blockquote]: https://github.com/yozorajs/yozora-react/tree/main/packages/blockquote#readme
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,5 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { IPartialYastInlineToken, ITokenizer, IBaseInlineTokenizerProps, IYastTokenDelimiter, IMatchInlineHookCreator, IParseInlineHookCreator, BaseInlineTokenizer, IInlineTokenizer } from '@yozora/core-tokenizer';
|
|
2
|
+
import { InlineMathType, InlineMath } from '@yozora/ast';
|
|
3
|
+
|
|
4
|
+
declare type T = InlineMathType;
|
|
5
|
+
declare type INode = InlineMath;
|
|
6
|
+
declare const uniqueName = "@yozora/tokenizer-inline-math";
|
|
7
|
+
interface IToken extends IPartialYastInlineToken<T> {
|
|
8
|
+
/**
|
|
9
|
+
* Thickness of the InlineMathDelimiter
|
|
10
|
+
*/
|
|
11
|
+
thickness: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* IDelimiter of InlineMathToken.
|
|
15
|
+
*/
|
|
16
|
+
interface IDelimiter extends IYastTokenDelimiter {
|
|
17
|
+
type: 'full';
|
|
18
|
+
/**
|
|
19
|
+
* Thickness of the InlineMathDelimiter
|
|
20
|
+
*/
|
|
21
|
+
thickness: number;
|
|
22
|
+
}
|
|
23
|
+
interface IThis extends ITokenizer {
|
|
24
|
+
/**
|
|
25
|
+
* Whether if the backtick mark wrapping necessary.
|
|
26
|
+
*/
|
|
27
|
+
readonly backtickRequired: boolean;
|
|
28
|
+
}
|
|
29
|
+
interface ITokenizerProps extends Partial<IBaseInlineTokenizerProps> {
|
|
30
|
+
/**
|
|
31
|
+
* Whether if the backtick mark wrapping necessary.
|
|
32
|
+
* @default true
|
|
33
|
+
*/
|
|
34
|
+
readonly backtickRequired?: boolean;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
declare const match: IMatchInlineHookCreator<T, IDelimiter, IToken, IThis>;
|
|
38
|
+
|
|
39
|
+
declare const parse: IParseInlineHookCreator<T, IToken, INode, IThis>;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Lexical Analyzer for inlineMath.
|
|
43
|
+
*/
|
|
44
|
+
declare class InlineMathTokenizer extends BaseInlineTokenizer<T, IDelimiter, IToken, INode, IThis> implements IInlineTokenizer<T, IDelimiter, IToken, INode, IThis> {
|
|
45
|
+
readonly backtickRequired: boolean;
|
|
46
|
+
constructor(props?: ITokenizerProps);
|
|
47
|
+
readonly match: IMatchInlineHookCreator<T, IDelimiter, IToken, IThis>;
|
|
48
|
+
readonly parse: IParseInlineHookCreator<T, IToken, INode, IThis>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { IThis as IInlineMathHookContext, IToken as IInlineMathToken, ITokenizerProps as IInlineMathTokenizerProps, InlineMathTokenizer, uniqueName as InlineMathTokenizerName, InlineMathTokenizer as default, match as inlineMathMatch, parse as inlineMathParse };
|
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.2",
|
|
4
4
|
"description": "Tokenizer for processing inline math (formulas)",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "guanghechen",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"url": "https://github.com/yozorajs/yozora.git",
|
|
12
12
|
"directory": "tokenizers/inline-math"
|
|
13
13
|
},
|
|
14
|
-
"homepage": "https://
|
|
14
|
+
"homepage": "https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/inline-math",
|
|
15
15
|
"keywords": [
|
|
16
16
|
"yozora",
|
|
17
17
|
"markdown",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"source": "src/index.ts",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"engines": {
|
|
30
|
-
"node": ">=
|
|
30
|
+
"node": ">= 16.0.0"
|
|
31
31
|
},
|
|
32
32
|
"files": [
|
|
33
33
|
"lib/",
|
|
@@ -45,12 +45,12 @@
|
|
|
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.2",
|
|
49
|
+
"@yozora/character": "^2.0.2",
|
|
50
|
+
"@yozora/core-tokenizer": "^2.0.2"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@yozora/tokenizer-inline-code": "^2.0.
|
|
53
|
+
"@yozora/tokenizer-inline-code": "^2.0.2"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "6911295e9eacfa29563fe93494704190e50625fd"
|
|
56
56
|
}
|