fixed legendary, modified element regex

This commit is contained in:
Daniel 2018-03-08 23:35:14 -05:00
parent 8e1731b1df
commit d4a50fc999
3 changed files with 19 additions and 19 deletions

File diff suppressed because one or more lines are too long

View File

@ -45,7 +45,7 @@ export function Unique(props) {
} }
} }
if (props.data.legendary) { if (props.data.legendary) {
string+="Legendary"; string = (string) ? ("Legendary, " + string) : "Legendary";
} }
string = string.replace(/,\s+$/, ""); string = string.replace(/,\s+$/, "");
return ( return (
@ -97,9 +97,9 @@ export function Ability(props) {
} }
const elements = { const elements = {
regex: /(fire)|(air)|(earth)|(water)/i, regex: new RegExp(/(\b((fire)|(air)|(earth)|(water)))/i),
fn: (key, result) => { fn: (key, result) => {
return (<span key={key}><Element element={result[0]} value="true" size="icon14"/>{result[0]}</span>); return (<span key={key}><Element element={result[0].replace(/\b/, '')} value="true" size="icon14"/>{result[0]}</span>);
} }
} }

View File

@ -36,7 +36,7 @@
animation: love .5s infinite linear alternate-reverse; animation: love .5s infinite linear alternate-reverse;
} }
a { .with-love a {
text-decoration: none; text-decoration: none;
border-bottom: 1px dotted; border-bottom: 1px dotted;
} }