niftythoughts / ansi-highlighter-premium

4 stars 0 forks source link

Not able to use IDE find in file #4

Closed alexvelea closed 1 year ago

alexvelea commented 1 year ago

Initially, I was using a sed command sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g' to remove colors from log files so I can search them. I really enjoy seeing them colored, but I'm not able to perform searches in them using the default search box in GoLand, in my case.

Would there be a way to make them searchable as well, not only to display them?

niftythoughts commented 1 year ago

Hi, I am not able to reproduce the issue - tested with version 22.2.4, search works properly

Screen Shot 2022-10-21 at 9 12 47 PM

Please specify the following:

alexvelea commented 1 year ago

Sorry for being so vague. Realized afterward that I'm able to search text if it's one color. We're using github.com/sirupsen/logrus for logging. I wanted to search for errors in the file, honestly. Unfortunately, they are displayed like [E] and the E is in a different color than the brackets.

Screenshot 2022-10-25 at 14 44 17

niftythoughts commented 1 year ago

No problem, with regards to the E in different color it must be coming from Logrus highlighting style/configuration - the ANSI control codes sitting behind can be inspected by opening the log file in plain mode.

Closing the issue.

niftythoughts commented 1 year ago

The issue is not irrelevant at second thought, support for search omitting ANSI codes should be added in the future.

Ticket re-opened as enhancement, thanks for reporting.

alexvelea commented 1 year ago

Thank you for looking into this, and sorry again for the really bad reporting 🙏🏻

niftythoughts commented 1 year ago

Issue resolved with 22.3.1-EAP

22.3.1 should follow on time with IDE official release

niftythoughts commented 1 year ago

22.3.1 released.