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

code formatting seems to break the extension #52

Open
RedMoikle opened this issue Nov 13, 2020 · 1 comment
Open

code formatting seems to break the extension #52

RedMoikle opened this issue Nov 13, 2020 · 1 comment

Comments

@RedMoikle
Copy link

I am trying to search for for loops in some python code examples for a module.

I can see one on the screen so I know where it should be highlighted.
in the search bar I use:
for\s\w+\sin
to search for "for" followed by a whitespace character, then any variable name, followed by another whitespace character and finally the word "in"

This formula works for text on the page that is not formatted as code, but not if it is in a code block.
image

The extension CAN find single words in code blocks, if I search for just "for" it manages to find them in code blocks (as well as outside of them)

in fact white space in code formatting seems to completely block this extension (even when using .* to select ALL characters following the searched string):
image

Here I have searched for all examples of the characters "de" and then everything that follows them. as you can see, the white space in the code blocks ends this search.

Interestingly there is no issue with chrome's standard Ctrl+F function, that can find full sentences inside of code blocks.

@RedMoikle
Copy link
Author

RedMoikle commented Nov 13, 2020

After some more testing, this seems to be because it is reading spans separately, and parts of the code are in separate spans to have keywords highlighted in different colours. Would it be possible to have an option to ignore html tags, listing only their contents, and maybe concatenating them (like chrome's default ctrl+f does)?

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

1 participant