Add global and replace

This commit is contained in:
Ricky Miller 2018-02-12 10:32:11 -06:00 committed by Jordan Eldredge
parent cd8d38b371
commit c8caec573a

View file

@ -78,7 +78,7 @@ export const parseIni = text => {
let section, match;
return text.split(/[\r\n]+/g).reduce((data, line) => {
if ((match = line.match(PROPERTY_REGEX)) && section != null) {
const value = match[2].replace(/("|')/, "");
const value = match[2].replace(/("|')/gi, "");
data[section][match[1].trim().toLowerCase()] = value;
} else if ((match = line.match(SECTION_REGEX))) {
section = match[1].trim().toLowerCase();