-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Common Situation] Want to ignore a Str node that is wrapped by Link, BlockQuote etc #16
Comments
Context, We want to add a new node type like |
What the naming of this helper method? |
4 tasks
|
BlockQuote is an exception.
|
isStrUnderParagraph(node: TxtNode): boolean {
if (node.type !== ASTNodeTypes.Str) {
return false;
}
if (node.parent?.type !== ASTNodeTypes.Paragraph) {
return false;
}
const isInUncontrollableNode = this.isChildNode(node, [ASTNodeTypes.BlockQuote]);
return !isInUncontrollableNode
} This is wanted logics. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a common pattern. We want to provide this detection as a method.
https://github.com/search?q=LinkReference+textlint&type=code
The text was updated successfully, but these errors were encountered: