ChristopherSD / ed4-steps2foundry

A Foundry VTT module to import characters created with SecondStep (secondstep.dk) into the Earthdawn game system.
1 stars 0 forks source link

Improve name matching with compendium items (normalized strings) #2

Open ChristopherSD opened 3 years ago

ChristopherSD commented 3 years ago

Currently, compendium items are retrieved based on an approximation of the actual name (adding spaces etc). This does not account for edge cases like apostrophes, etc.

Try to improve this a bit. For example by using normalized strings (all lowercase, no special characters, no whitespace), which would need to iterate over all items in the compendium and comparing the name instead of using .getName(name).