ctags-patterns-for-javascript
ctags-patterns-for-javascript copied to clipboard
not picking up method signatures that span multiple lines
This works:
extractEmailsFromString(text, options = { isWrappedLessThanGreaterThan: false, }) {
if (options.isWrappedLessThanGreaterThan) {
return text.match(/(<[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+>)/gi);
}
return text.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)/gi);
}
But this doesn't work:
extractEmailsFromString(text, options = {
isWrappedLessThanGreaterThan: false,
}) {
if (options.isWrappedLessThanGreaterThan) {
return text.match(/(<[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+>)/gi);
}
return text.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9_-]+)/gi);
}
I know ctags works on a line by line basis, so is this just not possible to implement? Thanks for making this project!
Yeah, in cases where there is no function or : or = I need to be sure that this is a definition and not a call and for that I must find the ) {.
I don't think I've ever tried to use \n in this context but I can see this becoming very complicated very quickly. I will see what I can do.