File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ type Rule = {
25
25
scope: RuleScope ;
26
26
regex: RegExp ;
27
27
parse(match : RegexMatch ): ASTNode ;
28
- react(node : ASTNode ): ReactElementDescription ;
28
+ react(node : ASTNode , ast : AST ): ReactElementDescription ;
29
29
}
30
30
31
31
const atRule = {
@@ -35,7 +35,7 @@ const atRule = {
35
35
parse(match ): ASTNode {
36
36
return { name: ' atRule' , content: [match .capture [0 ]] }
37
37
},
38
- react(node : ASTNode ): ReactElementDescription {
38
+ react(node : ASTNode , ast : AST ): ReactElementDescription {
39
39
return { type: ' a' , props: { href: ` https://url.com?user=${Utils .getText (node )} ` } }
40
40
}
41
41
};
@@ -48,7 +48,7 @@ import { Link } from 'react-router';
48
48
49
49
const customLinkRule: Rule = {
50
50
... LinkRule ,
51
- react(node : string | { name : string ; content : AST } ): ReactElementDescription {
51
+ react(node : ASTNode , ast : AST ): ReactElementDescription {
52
52
return {type: Link , props: {className: ' paragraph-class' , to: Utils .getText (node ) }}
53
53
}
54
54
};
You can’t perform that action at this time.
0 commit comments