thomsonreuters / AtomOntologyCompleter

An autocompleter for the atom editor that supports completing predicate names within common ontologies when editing RDF turtle files.
MIT License
10 stars 2 forks source link

Doubling of signs in autocompletion when numbers are involved #2

Closed musicEnfanthen closed 6 years ago

musicEnfanthen commented 6 years ago

When the value to be completed starts with a combination of letters and numbers (like in #CIDOCs E1_CRM_Entitiy; F22_Self-Contained_Expression), the autocompleted result will double the letter/number combination like so: E1E1_CRM_Entity, F22F22_Self-Contained Expression.

The underscore is irrelevant for this issue, E1CRM results in E1E1CRM, too.

TRnonodename commented 6 years ago

Interesting... it's possibly the regex I use to identify the token boundary. Can you share the ontology you're using so I can try and reproduce locally?

TRnonodename commented 6 years ago

I just tried to reproduce by adding a predicate E1_CRM_Entity to the foaf_override.json test file (in /spec) and it works fine. I also checked the regex and that won't be the cause. Which version of the completer are you using? I saw this behavior from time to time in early versions but haven't seen it recently.

musicEnfanthen commented 6 years ago

Ok, I see. Sorry, I did not recognize that the suggestions in question did not come from the turtle-completer but from Atoms in-built autocomplete-plus package.

Found a similar issue on another repository (https://github.com/autocomplete-python/autocomplete-python/issues/364) that supposes that this issue has its very grounds in atoms autocomplete-plus package https://github.com/atom/autocomplete-plus/issues/950.

So sorry for the false alert.

TRnonodename commented 6 years ago

Thanks for digging into this! You prompted me to add some more unit tests around the edge cases so still valuable :-)