|
|
@@ -98,15 +98,15 @@
|
|
|
(if file
|
|
|
(let [page-format (db/get-page-format page-name)
|
|
|
properties-content (db/get-page-properties-content page-name)
|
|
|
- properties-content (if properties-content
|
|
|
- (string/trim properties-content)
|
|
|
- (config/properties-wrapper page-format))
|
|
|
file (db/entity (:db/id (:page/file page)))
|
|
|
file-path (:file/path file)
|
|
|
file-content (db/get-file file-path)
|
|
|
- after-content (if (empty? properties-content)
|
|
|
+ after-content (if (string/blank? properties-content)
|
|
|
file-content
|
|
|
(subs file-content (inc (count properties-content))))
|
|
|
+ properties-content (if properties-content
|
|
|
+ (string/trim properties-content)
|
|
|
+ (config/properties-wrapper page-format))
|
|
|
new-properties-content (db/add-properties! page-format properties-content properties)
|
|
|
full-content (str new-properties-content "\n\n" (string/trim after-content))]
|
|
|
(file-handler/alter-file (state/get-current-repo)
|