Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@codeinabox
Copy link
Collaborator

No description provided.

@codeinabox
Copy link
Collaborator Author

@janko I know understand why this isn't working, it's because test#base#nearest_test_in_line goes through line by line which means that multi-line matching for test nearest isn't currently possible. Any suggestions on how to proceed with this?

@janko
Copy link
Member

janko commented Aug 15, 2020

Not sure, line-by-line matching is needed to detect nesting. I don’t know how to handle multiline matching as well 🤔

@codeinabox
Copy link
Collaborator Author

What if test nearest match started at a single line and then kept expanding in range in both directions till a match was found? For example I run it at line 12 and it searches that line, then tries lines 11 to 13, then 10 to 14 and so forth.

@janko
Copy link
Member

janko commented Aug 15, 2020

I don’t know exactly how you would calculate indentation with regexes. Currently the code updates some state after each line. And it’s only going up from the current line IIRC.

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

Successfully merging this pull request may close these issues.

2 participants