fix: Move references spacing directly below content (#1113)

* fix: Move references spacing directly below content

* Child document -> Nested document
This commit is contained in:
Tom Moor
2019-12-18 21:00:36 -08:00
committed by GitHub
parent 949dd296b4
commit 293c3b7b9c
9 changed files with 33 additions and 12 deletions

View File

@@ -52,6 +52,19 @@ export default class Document extends BaseModel {
}
}
@computed
get isOnlyTitle(): boolean {
const { title } = parseTitle(this.text);
// find and extract title
const trimmedBody = this.text
.trim()
.replace(/^#/, '')
.trim();
return unescape(trimmedBody) === title;
}
@computed
get modifiedSinceViewed(): boolean {
return !!this.lastViewedAt && this.lastViewedAt < this.updatedAt;