Fixing re-display of regex
This commit is contained in:
parent
4af501b37b
commit
5fcb0758a3
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user