This commit is contained in:
Tom Moor
2017-07-23 19:11:48 -07:00
parent 756f507f07
commit 9fe4f7471c

View File

@@ -74,7 +74,7 @@ class Document {
@computed get isEmpty(): boolean {
// Check if the document title has been modified and user generated content exists
return this.text.replace(new RegExp(`^\#$`), '').trim().length === 0;
return this.text.replace(new RegExp(`^#$`), '').trim().length === 0;
}
@computed get allowSave(): boolean {
@@ -149,7 +149,7 @@ class Document {
if (!this.title) {
this.title = DEFAULT_TITLE;
this.text = this.text.replace(
new RegExp(`^\# `),
new RegExp(`^# `),
`# ${DEFAULT_TITLE}`
);
}