Skip to content

Conversation

@shadowwa
Copy link
Contributor

when using --prefix along --color as done in https://github.com/coreyja/fzf.devicon.vim the text comming after the prefix is duplicated

it can be reproduced by

$ rg --column --line-number --no-heading --color=always --smart-case -- Extends vendor/smarty/ | devicon-lookup --color --prefix :
 vendor/smarty/smarty/demo/plugins/resource.extendsall.php:4:4: * Extends All Resource:4:4: * Extends All Resource
 vendor/smarty/smarty/demo/plugins/resource.extendsall.php:11:23:class Smarty_Resource_Extendsall extends Smarty_Internal_Resource_Extends:11:23:class Smarty_Resource_Extendsall extends Smarty_Internal_Resource_Extends

while the expected result should be

 vendor/smarty/smarty/demo/plugins/resource.extendsall.php:4:4: * Extends All Resource
 vendor/smarty/smarty/demo/plugins/resource.extendsall.php:11:23:class Smarty_Resource_Extendsall extends Smarty_Internal_Resource_Extends

I've added a test and a simple test to fix the problem.

@coreyja
Copy link
Owner

coreyja commented Apr 8, 2025

Hey @shadowwa sorry for missing these PRs!

This looks great, I will look to get it merged and released here soon. Thanks for the contributions!

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