Fixing re-display of regex

This commit is contained in:
Jeff Avallone 2014-12-06 10:36:23 -05:00
parent 4af501b37b
commit 5fcb0758a3
1 changed files with 2 additions and 2 deletions

View File

@ -30,14 +30,14 @@ export default class Regexper {
} }
hashchangeListener() { hashchangeListener() {
var expression = decodeURIComponent(location.hash.slice(1)).replace(/[\r\n]/g, ''); var expression = decodeURIComponent(location.hash.slice(1));
if (expression !== '') { if (expression !== '') {
this.field.value = expression; this.field.value = expression;
this.setState('is-loading'); this.setState('is-loading');
this.renderRegexp(expression) this.renderRegexp(expression.replace(/[\r\n]/g, ''))
.then((() => { .then((() => {
this.setState('has-results'); this.setState('has-results');
this.updateLinks(); this.updateLinks();