Skip to content

Commit fc3e596

Browse files
Merge pull request #9 from bchainhub/update/fixes-04
Fixes
2 parents f80104f + 033b09a commit fc3e596

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

dist/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ const makeTextNode = (text) => ({
1111
value: text,
1212
});
1313
const makeStrikethroughNode = (text) => ({
14-
type: 'delete',
15-
children: [{ type: 'text', value: text }],
14+
type: 'text',
15+
value: `~~${text}~~`,
1616
});
1717
const shortenId = (hash) => `${hash.slice(0, 4)}${hash.slice(-4)}`;
1818
const corepassPattern = /\[(!?)(((cb|ab|ce)[0-9]{2}[0-9a-f]{40})|((?:[a-z0-9_-]|\p{Emoji})+(?:\.(?:[a-z0-9_-]|\p{Emoji})+)*\.([a-z0-9]+)))@coreid\]/giu;

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "remark-corepass",
3-
"version": "0.1.6",
3+
"version": "0.1.7",
44
"description": "A Remark plugin to transform CorePass notations into markdown links.",
55
"main": "dist/index.js",
66
"types": "types/index.d.ts",
@@ -9,7 +9,8 @@
99
"test": "npm run build && node --loader ts-node/esm ./node_modules/uvu/bin.js test",
1010
"build": "tsc",
1111
"dev": "node --loader ts-node/esm --inspect src/index.ts",
12-
"start": "node --loader ts-node/esm src/index.ts"
12+
"start": "node --loader ts-node/esm src/index.ts",
13+
"verbose": "clear && npm run build && node --loader ts-node/esm ./node_modules/uvu/bin.js --verbose test"
1314
},
1415
"repository": {
1516
"type": "git",
@@ -41,13 +42,13 @@
4142
"unist-util-visit": "^5.0.0"
4243
},
4344
"devDependencies": {
44-
"@types/node": "^20.11.24",
45+
"@types/node": "^20.12.7",
4546
"esm": "^3.2.25",
4647
"remark-parse": "^11.0.0",
4748
"remark-stringify": "^11.0.0",
4849
"ts-node": "^10.9.2",
49-
"typescript": "^5.3.3",
50-
"undici-types": "^6.6.2",
50+
"typescript": "^5.4.5",
51+
"undici-types": "^6.13.0",
5152
"unified": "^11.0.4",
5253
"uvu": "^0.5.6"
5354
},

src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ interface TextNode extends Node {
3030
}
3131

3232
interface DelNode extends Node {
33-
type: 'delete';
34-
children: Array<TextNode>;
33+
type: 'text';
34+
value: string;
3535
}
3636

3737
const makeLinkNode = (url: string, text: string, title?: string): LinkNode => ({
@@ -47,8 +47,8 @@ const makeTextNode = (text: string): TextNode => ({
4747
});
4848

4949
const makeStrikethroughNode = (text: string): DelNode => ({
50-
type: 'delete',
51-
children: [{ type: 'text', value: text }],
50+
type: 'text',
51+
value: `~~${text}~~`,
5252
});
5353

5454
const shortenId = (hash: string) => `${hash.slice(0, 4)}${hash.slice(-4)}`;

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"module": "Node16",
55
"outDir": "./dist",
66
"strict": true,
7+
"forceConsistentCasingInFileNames": true,
78
"typeRoots": ["./node_modules/@types", "./types"],
89
"removeComments": true,
910
"declaration": true

types/index.d.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,5 @@ declare module 'remark-corepass' {
66
enableSkippingIcanCheck?: boolean;
77
}
88

9-
function remarkCorepass(options?: CorepassOptions): (ast: Node) => void;
10-
11-
export default remarkCorepass;
9+
export default function remarkCorepass(options?: CorepassOptions): (ast: Node) => void;
1210
}

0 commit comments

Comments
 (0)