Skip to content
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

not picking up method signatures that span multiple lines #40

Open
dyllandry opened this issue Apr 6, 2021 · 1 comment
Open

not picking up method signatures that span multiple lines #40

dyllandry opened this issue Apr 6, 2021 · 1 comment

Comments

@dyllandry
Copy link

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!

@romainl
Copy link
Owner

romainl commented Apr 6, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants