arnonram / swade-npc-importer

Savage Worlds Stat-block importer for FoundryVTT
7 stars 8 forks source link

Support for importing with template items of compendiums #80

Open SalieriC opened 3 years ago

SalieriC commented 3 years ago

This is a minor qol feature request. When importing actors the importer adds the original text to the items which are taken from compendiums. This is very useful but can mess up with some official stuff like the Special Abilities from the pathfinder module. The way it is set up in these modules is like so:

<div class="something-core">
Text
</div>

So the idea is for the importer to search for <div class="/<div class="[a-zA-z]+-[a-zA-z]+">/g"> and then places the original text from the import (with the <hr />) right after the div tag. The result would be a more consistent look. Surely the regex can be improved though.