File tree Expand file tree Collapse file tree 5 files changed +14
-14
lines changed Expand file tree Collapse file tree 5 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ const makeTextNode = (text) => ({
11
11
value : text ,
12
12
} ) ;
13
13
const makeStrikethroughNode = ( text ) => ( {
14
- type : 'delete ' ,
15
- children : [ { type : ' text' , value : text } ] ,
14
+ type : 'text ' ,
15
+ value : `~~ ${ text } ~~` ,
16
16
} ) ;
17
17
const shortenId = ( hash ) => `${ hash . slice ( 0 , 4 ) } …${ hash . slice ( - 4 ) } ` ;
18
18
const corepassPattern = / \[ ( ! ? ) ( ( ( c b | a b | c e ) [ 0 - 9 ] { 2 } [ 0 - 9 a - f ] { 40 } ) | ( (?: [ a - z 0 - 9 _ - ] | \p{ Emoji} ) + (?: \. (?: [ a - z 0 - 9 _ - ] | \p{ Emoji} ) + ) * \. ( [ a - z 0 - 9 ] + ) ) ) @ c o r e i d \] / giu;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " remark-corepass" ,
3
- "version" : " 0.1.6 " ,
3
+ "version" : " 0.1.7 " ,
4
4
"description" : " A Remark plugin to transform CorePass notations into markdown links." ,
5
5
"main" : " dist/index.js" ,
6
6
"types" : " types/index.d.ts" ,
9
9
"test" : " npm run build && node --loader ts-node/esm ./node_modules/uvu/bin.js test" ,
10
10
"build" : " tsc" ,
11
11
"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"
13
14
},
14
15
"repository" : {
15
16
"type" : " git" ,
41
42
"unist-util-visit" : " ^5.0.0"
42
43
},
43
44
"devDependencies" : {
44
- "@types/node" : " ^20.11.24 " ,
45
+ "@types/node" : " ^20.12.7 " ,
45
46
"esm" : " ^3.2.25" ,
46
47
"remark-parse" : " ^11.0.0" ,
47
48
"remark-stringify" : " ^11.0.0" ,
48
49
"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 " ,
51
52
"unified" : " ^11.0.4" ,
52
53
"uvu" : " ^0.5.6"
53
54
},
Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ interface TextNode extends Node {
30
30
}
31
31
32
32
interface DelNode extends Node {
33
- type : 'delete ' ;
34
- children : Array < TextNode > ;
33
+ type : 'text ' ;
34
+ value : string ;
35
35
}
36
36
37
37
const makeLinkNode = ( url : string , text : string , title ?: string ) : LinkNode => ( {
@@ -47,8 +47,8 @@ const makeTextNode = (text: string): TextNode => ({
47
47
} ) ;
48
48
49
49
const makeStrikethroughNode = ( text : string ) : DelNode => ( {
50
- type : 'delete ' ,
51
- children : [ { type : ' text' , value : text } ] ,
50
+ type : 'text ' ,
51
+ value : `~~ ${ text } ~~` ,
52
52
} ) ;
53
53
54
54
const shortenId = ( hash : string ) => `${ hash . slice ( 0 , 4 ) } …${ hash . slice ( - 4 ) } ` ;
Original file line number Diff line number Diff line change 4
4
"module" : " Node16" ,
5
5
"outDir" : " ./dist" ,
6
6
"strict" : true ,
7
+ "forceConsistentCasingInFileNames" : true ,
7
8
"typeRoots" : [" ./node_modules/@types" , " ./types" ],
8
9
"removeComments" : true ,
9
10
"declaration" : true
Original file line number Diff line number Diff line change @@ -6,7 +6,5 @@ declare module 'remark-corepass' {
6
6
enableSkippingIcanCheck ?: boolean ;
7
7
}
8
8
9
- function remarkCorepass ( options ?: CorepassOptions ) : ( ast : Node ) => void ;
10
-
11
- export default remarkCorepass ;
9
+ export default function remarkCorepass ( options ?: CorepassOptions ) : ( ast : Node ) => void ;
12
10
}
You can’t perform that action at this time.
0 commit comments