From fb34d15e3cc6ae4e91760bf7aa199ec1ada66db2 Mon Sep 17 00:00:00 2001 From: Djamil Legato Date: Thu, 18 Sep 2014 18:02:30 -0700 Subject: [PATCH] Fixed regexp to match only front matter and not getting confused with hr --- themes/grav/js/htmleditor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/grav/js/htmleditor.js b/themes/grav/js/htmleditor.js index c10cb1a0..ad633c0c 100755 --- a/themes/grav/js/htmleditor.js +++ b/themes/grav/js/htmleditor.js @@ -267,7 +267,7 @@ render: function() { - this.currentvalue = this.editor.getValue().replace(/^---\n([^---]*)---\n{1,}/, ''); + this.currentvalue = this.editor.getValue().replace(/^---([\s\S]*?)---\n{1,}/gm, ''); // empty code if (!this.currentvalue) {