@yozora/tokenizer-break 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020-2021 guanghechen (me.guanghechen@gmail.com)
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-break",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "author": {
5
5
  "name": "guanghechen",
6
6
  "url": "https://github.com/guanghechen/"
@@ -30,14 +30,14 @@
30
30
  ],
31
31
  "scripts": {
32
32
  "build": "cross-env NODE_ENV=production rollup -c ../../rollup.config.js",
33
- "prebuild": "rimraf lib/ && tsc -p tsconfig.src.json --emitDeclarationOnly",
33
+ "prebuild": "rimraf lib/",
34
34
  "prepublishOnly": "cross-env ROLLUP_SHOULD_SOURCEMAP=false yarn build",
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.2",
39
- "@yozora/character": "^2.0.2",
40
- "@yozora/core-tokenizer": "^2.0.2"
38
+ "@yozora/ast": "^2.0.4",
39
+ "@yozora/character": "^2.0.4",
40
+ "@yozora/core-tokenizer": "^2.0.4"
41
41
  },
42
- "gitHead": "6911295e9eacfa29563fe93494704190e50625fd"
42
+ "gitHead": "c980b95254394dcacba0cbb4bea251350b09397c"
43
43
  }
@@ -1,17 +0,0 @@
1
- import type { IMatchInlineHookCreator } from '@yozora/core-tokenizer';
2
- import type { IDelimiter, IThis, IToken, T } from './types';
3
- /**
4
- * A line break (not in a code span or HTML tag) that is preceded by two or more
5
- * spaces and does not occur at the end of a block is parsed as a hard line
6
- * break (rendered in HTML as a <br /> tag)
7
- * @see https://github.github.com/gfm/#hard-line-breaks
8
- *
9
- * A regular line break (not in a code span or HTML tag) that is not preceded
10
- * by two or more spaces or a backslash is parsed as a softbreak. (A softbreak
11
- * may be rendered in HTML either as a line ending or as a space. The result
12
- * will be the same in browsers.
13
- * @see https://github.github.com/gfm/#soft-line-breaks
14
- *
15
- * @see https://github.com/syntax-tree/mdast#break
16
- */
17
- export declare const match: IMatchInlineHookCreator<T, IDelimiter, IToken, IThis>;
@@ -1,3 +0,0 @@
1
- import type { IParseInlineHookCreator } from '@yozora/core-tokenizer';
2
- import type { INode, IThis, IToken, T } from './types';
3
- export declare const parse: IParseInlineHookCreator<T, IToken, INode, IThis>;
@@ -1,14 +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 a line break.
6
- * @see https://github.github.com/gfm/#hard-line-breaks
7
- * @see https://github.github.com/gfm/#soft-line-breaks
8
- * @see https://github.com/syntax-tree/mdast#break
9
- */
10
- export declare class BreakTokenizer extends BaseInlineTokenizer<T, IDelimiter, IToken, INode, IThis> implements IInlineTokenizer<T, IDelimiter, IToken, INode, IThis> {
11
- constructor(props?: ITokenizerProps);
12
- readonly match: IMatchInlineHookCreator<T, IDelimiter, IToken, IThis>;
13
- readonly parse: IParseInlineHookCreator<T, IToken, INode, IThis>;
14
- }
@@ -1,28 +0,0 @@
1
- import type { Break, BreakType } from '@yozora/ast';
2
- import type { IBaseInlineTokenizerProps, IPartialYastInlineToken, ITokenizer, IYastTokenDelimiter } from '@yozora/core-tokenizer';
3
- export declare type T = BreakType;
4
- export declare type INode = Break;
5
- export declare const uniqueName = "@yozora/tokenizer-break";
6
- export declare type IToken = IPartialYastInlineToken<T>;
7
- export interface IDelimiter extends IYastTokenDelimiter {
8
- type: 'full';
9
- /**
10
- * Line break marker type.
11
- */
12
- markerType: BreakTokenMarkerType;
13
- }
14
- export declare type IThis = ITokenizer;
15
- export declare type ITokenizerProps = Partial<IBaseInlineTokenizerProps>;
16
- /**
17
- * Line break marker type.
18
- */
19
- export declare enum BreakTokenMarkerType {
20
- /**
21
- * Backslash at the end of the line
22
- */
23
- BACKSLASH = "backslash",
24
- /**
25
- * More than two spaces at the end of the line
26
- */
27
- MORE_THAN_TWO_SPACES = "more-than-two-spaces"
28
- }