Skip to content

Commit ffcfc05

Browse files
author
Nicklas Utgaard
committed
docs: ✏️ updated docs with new api
1 parent d7a1c8f commit ffcfc05

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ type Rule = {
2525
scope: RuleScope;
2626
regex: RegExp;
2727
parse(match: RegexMatch): ASTNode;
28-
react(node: ASTNode): ReactElementDescription;
28+
react(node: ASTNode, ast: AST): ReactElementDescription;
2929
}
3030

3131
const atRule = {
@@ -35,7 +35,7 @@ const atRule = {
3535
parse(match): ASTNode {
3636
return { name: 'atRule', content: [match.capture[0]] }
3737
},
38-
react(node: ASTNode): ReactElementDescription {
38+
react(node: ASTNode, ast: AST): ReactElementDescription {
3939
return { type: 'a', props: { href: `https://url.com?user=${Utils.getText(node)}` } }
4040
}
4141
};
@@ -48,7 +48,7 @@ import { Link } from 'react-router';
4848

4949
const customLinkRule: Rule = {
5050
...LinkRule,
51-
react(node: string | { name: string; content: AST }): ReactElementDescription {
51+
react(node: ASTNode, ast: AST): ReactElementDescription {
5252
return {type: Link, props: {className: 'paragraph-class', to: Utils.getText(node) }}
5353
}
5454
};

0 commit comments

Comments
 (0)