diff --git a/assets/dist/templates/frontmatter.tmpl b/assets/dist/templates/frontmatter.tmpl index 8664cf1a..83b511e0 100644 --- a/assets/dist/templates/frontmatter.tmpl +++ b/assets/dist/templates/frontmatter.tmpl @@ -4,7 +4,7 @@ {{ if or (eq $value.Type "object") (eq $value.Type "array") }}
{{ else }} diff --git a/assets/src/js/editor.js b/assets/src/js/editor.js index 86182cb8..e1536253 100644 --- a/assets/src/js/editor.js +++ b/assets/src/js/editor.js @@ -254,11 +254,7 @@ $(document).on('page:editor', function() { $("#content").on('click', '.delete', function(event) { event.preventDefault(); - button = $(this); - - name = button.parent().parent().attr("for") || button.parent().parent().attr("id") || button.parent().parent().parent().attr("id"); - name = name.replace(/\[/, '\\['); - name = name.replace(/\]/, '\\]'); + name = $(this).data("delete"); $('label[for="' + name + '"]').fadeOut().remove(); $('#' + name).fadeOut().remove();