Merge pull request #123 from symposion/fix-legendary-action-count

Fix legendary action count parsing.
This commit is contained in:
Mark
2016-05-01 11:24:54 +02:00
@@ -4035,9 +4035,9 @@ const parseSRDContentSection = (content, finalSetAttrs, title, name) => {
}
if (exists(section)) {
if (name === 'legendaryaction') {
const legendaryActionsMatch = content.match(/Can take (\d+) Legendary Actions/gi);
const legendaryActionsMatch = section.match(/Can take (\d+) Legendary Actions/i);
if (legendaryActionsMatch && legendaryActionsMatch[1]) {
finalSetAttrs.legendary_action_amount = legendaryActionAmount[1];
finalSetAttrs.legendary_action_amount = legendaryActionsMatch[1];
}
}