Loading namelist/namelist.py +3 −2 Original line number Diff line number Diff line Loading @@ -212,7 +212,8 @@ def _tokenize(text): hashed_tokens[hashed] = match.group(0) text = re.sub(match.group(0), fs+hashed+fs, text, 1) for char, rep in zip(('\n', r',', ' ', '=', ), (fs, fs, fs, fs+'='+fs)): for char, rep in zip(('\n', r',', ' ', '=', '(/', '/)'), (fs, fs, fs, fs+'='+fs, fs, fs)): text = text.replace(char, rep) text = text.split(fs) tokens = [token.strip() for token in text if token.strip() != ''] Loading Loading
namelist/namelist.py +3 −2 Original line number Diff line number Diff line Loading @@ -212,7 +212,8 @@ def _tokenize(text): hashed_tokens[hashed] = match.group(0) text = re.sub(match.group(0), fs+hashed+fs, text, 1) for char, rep in zip(('\n', r',', ' ', '=', ), (fs, fs, fs, fs+'='+fs)): for char, rep in zip(('\n', r',', ' ', '=', '(/', '/)'), (fs, fs, fs, fs+'='+fs, fs, fs)): text = text.replace(char, rep) text = text.split(fs) tokens = [token.strip() for token in text if token.strip() != ''] Loading